by ZvezdanD » Fri Jan 15, 2021 3:45 pm
benfucius wrote: ↑Fri Jan 15, 2021 2:50 pm
I am noticing a huge difference when using "Single Part" vs using "String Part".
I can create a mask as a Magic Node, or as a child of Playlists, doesn't matter where, as "Single Part" and the RAM of MediaMonkey rarely grows above 10%, never above 1gb.
However, if I change that same mask, only the very last node change Single to String Part, leaving everything else the same, and within a minute or two MediaMonkey will have consumed all of it's RAM and crash/freeze.
(Ideally I would use String Part on the last subnode of my masks, so that I can utilize Sort, which cannot be done with Single Part).
Here is the excerpt from the Usage section:
"The Split mode combo box has the next items: String part, String Before, String After, Single Part, Parts Before, Parts After, All Parts, Categories, Odd Parts and Even Parts. The first three items that start with the "String *" don't affect the enabled state of other controls in the dialog box because they are based on the SQL code to do parsing of the MN field, but
the complexity of the implemented code raises exponentially with the Split part value specified with the spin box, and for the large numbers you could even get the error message! The remaining items from the Split mode combo box don't have that problem since they are not using the SQL code, but VBScript instead. However, the drawback of the remaining items is that they cannot be used with the Sort by/Statistics qualifiers as well as almost none of the Show * qualifiers."
It doesn't matter if you use "String Part" only on one node. Its complexity determines the "Split part" number specified after it.
Here is the node field for Split part:1 with "String Part":
SubStr(Medias2.DriveStr || Songs.SongPath, 1, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') - 1)
Here is the node field for Split part:2 with "String Part":
SubStr(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999), 1, InStr(UpperW(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999)) || '\', '\') - 1)
Here is the node field for Split part:3 with "String Part":
SubStr(SubStr(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999), InStr(UpperW(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999)) || '\', '\') + 1, 9999), 1, InStr(UpperW(SubStr(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999), InStr(UpperW(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999)) || '\', '\') + 1, 9999)) || '\', '\') - 1)
and so on...
Here is the node field for Split part:1 with "Single Part":
Medias2.DriveStr || Songs.SongPath
and it is the same for Split part:2 or for Split part:3 or any other number.
And that is just a SQL code for the caption of node that is displayed, but there is also the hidden statistical field that is necessary for each node to correctly show if it could be expanded or not:
Split part:1 with "String Part":
Count(DISTINCT NullIf(SubStr(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999), 1, InStr(UpperW(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999)) || '\', '\') - 1) COLLATE IUNICODE, ''))
Split part:2 with "String Part":
Count(DISTINCT NullIf(SubStr(SubStr(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999), InStr(UpperW(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999)) || '\', '\') + 1, 9999), 1, InStr(UpperW(SubStr(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999), InStr(UpperW(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999)) || '\', '\') + 1, 9999)) || '\', '\') - 1) COLLATE IUNICODE, ''))
and so on...
And that is just for the Path field, but for the Folder field things are even more uglier.
[quote=benfucius post_id=476930 time=1610740245 user_id=105480]
I am noticing a huge difference when using "Single Part" vs using "String Part".
I can create a mask as a Magic Node, or as a child of Playlists, doesn't matter where, as "Single Part" and the RAM of MediaMonkey rarely grows above 10%, never above 1gb.
However, if I change that same mask, only the very last node change Single to String Part, leaving everything else the same, and within a minute or two MediaMonkey will have consumed all of it's RAM and crash/freeze.
(Ideally I would use String Part on the last subnode of my masks, so that I can utilize Sort, which cannot be done with Single Part).
[/quote]
Here is the excerpt from the Usage section:
"The Split mode combo box has the next items: String part, String Before, String After, Single Part, Parts Before, Parts After, All Parts, Categories, Odd Parts and Even Parts. The first three items that start with the "String *" don't affect the enabled state of other controls in the dialog box because they are based on the SQL code to do parsing of the MN field, but [b]the complexity of the implemented code raises exponentially with the Split part value specified with the spin box, and for the large numbers you could even get the error message![/b] The remaining items from the Split mode combo box don't have that problem since they are not using the SQL code, but VBScript instead. However, the drawback of the remaining items is that they cannot be used with the Sort by/Statistics qualifiers as well as almost none of the Show * qualifiers."
[b]It doesn't matter if you use "String Part" only on one node. Its complexity determines the "Split part" number specified after it.[/b]
Here is the node field for Split part:1 with "String Part":
SubStr(Medias2.DriveStr || Songs.SongPath, 1, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') - 1)
Here is the node field for Split part:2 with "String Part":
SubStr(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999), 1, InStr(UpperW(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999)) || '\', '\') - 1)
Here is the node field for Split part:3 with "String Part":
SubStr(SubStr(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999), InStr(UpperW(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999)) || '\', '\') + 1, 9999), 1, InStr(UpperW(SubStr(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999), InStr(UpperW(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999)) || '\', '\') + 1, 9999)) || '\', '\') - 1)
and so on...
Here is the node field for Split part:1 with "Single Part":
Medias2.DriveStr || Songs.SongPath
and it is the same for Split part:2 or for Split part:3 or any other number.
And that is just a SQL code for the caption of node that is displayed, but there is also the hidden statistical field that is necessary for each node to correctly show if it could be expanded or not:
Split part:1 with "String Part":
Count(DISTINCT NullIf(SubStr(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999), 1, InStr(UpperW(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999)) || '\', '\') - 1) COLLATE IUNICODE, ''))
Split part:2 with "String Part":
Count(DISTINCT NullIf(SubStr(SubStr(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999), InStr(UpperW(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999)) || '\', '\') + 1, 9999), 1, InStr(UpperW(SubStr(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999), InStr(UpperW(SubStr(Medias2.DriveStr || Songs.SongPath, InStr(UpperW(Medias2.DriveStr || Songs.SongPath) || '\', '\') + 1, 9999)) || '\', '\') + 1, 9999)) || '\', '\') - 1) COLLATE IUNICODE, ''))
and so on...
And that is just for the Path field, but for the Folder field things are even more uglier.