You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current implementation of c4group, the foldermap and its corresponding dependencies are not stored at the beginning of a c4folder. This means that the whole file has to be read until all required contents have been loaded to display the content in the clonk menu.
In addition, there is an implementation weakness when reading the dependencies from the foldermap. So the dependencies are read after occurrences in the foldermap. If resource B is listed before resource A in the foldermap, but resource A has been saved before resource B, then resource B is loaded first before the c4folder is read from the beginning in order to load resource A.
Details
Begin foldermap.txt Begin c4folder First read Second read
resource B needed c4s, c4d, other stuff | |
resource C needed resource A | <┘
resource A needed resource B <┤
End foldermap.txt resource C <┘
End c4folder
These two characteristics of the c4folder cause a freezing GUI when loading large c4folders like ModernCombat.c4f.
In this example the foldermap.txt and foldermap.png comes after all c4scenario groups. The dependencies of the foldermap.txt (png files) comes after the c4definitions and general c4groups, which can contain - with music for example - large files.
After sorting the c4folder manually with c4group.exe ModernCombat.c4f -s "Folder.txt|Title*.txt|Info.txt|Desc*.rtf|Title.png|Title.bmp|Icon.png|Icon.bmp|Author.txt|Version.txt|*.c4s|*.c4f|Loader*.bmp|Loader*.png|Loader*.jpeg|Loader*.jpg|FolderMap.txt|FolderMap.png|OverlayCategories.png|OverlayAtlanticCrisis.png|OverlayBabelTower.png|OverlayBaseJumping.png|OverlayBase1337.png|*.png" in pre-release v350 (v349 doesn't save the new file) the files are ordered much better. Thanks to @maxmitti for the command.
The folder now load much faster than before.
with_optimization.mp4without_optimization.mp4
I suggest that the dependencies of the foldermap and the foldermap itself are stored always near the start of the c4folder, before the other large c4 groups (c4s. c4d, c4g, c4f). This should be done by default trough c4group.exe
I also suggest to improve the reading of dependencies so that the order of dependencies in the foldermap.txt isn't a problem anymore and the c4folder must be read in only one time. @maxmitti is already aware of this issue.
The text was updated successfully, but these errors were encountered:
abcb225 already improves the sorting order to match the command mentioned above, except for the alphabetic reordering of the overlay graphics.
It is easy enough to rearrange the folder map entries to be in alphabetical order. The order should match the output order of the command c4group Folder.c4f, as this shows the order as files are stored.
The most I would do is rewriting the graphics loading for folder map graphics to load them in group order instead of in FolderMap.txt order, although it is much better already.
In the current implementation of c4group, the foldermap and its corresponding dependencies are not stored at the beginning of a c4folder. This means that the whole file has to be read until all required contents have been loaded to display the content in the clonk menu.
In addition, there is an implementation weakness when reading the dependencies from the foldermap. So the dependencies are read after occurrences in the foldermap. If resource B is listed before resource A in the foldermap, but resource A has been saved before resource B, then resource B is loaded first before the c4folder is read from the beginning in order to load resource A.
Details
These two characteristics of the c4folder cause a freezing GUI when loading large c4folders like ModernCombat.c4f.
Example with the current ModernCombat.c4f
Occurence in Foldermap:
Actual ordering in c4folder:
After sorting the c4folder manually with
c4group.exe ModernCombat.c4f -s "Folder.txt|Title*.txt|Info.txt|Desc*.rtf|Title.png|Title.bmp|Icon.png|Icon.bmp|Author.txt|Version.txt|*.c4s|*.c4f|Loader*.bmp|Loader*.png|Loader*.jpeg|Loader*.jpg|FolderMap.txt|FolderMap.png|OverlayCategories.png|OverlayAtlanticCrisis.png|OverlayBabelTower.png|OverlayBaseJumping.png|OverlayBase1337.png|*.png"
in pre-release v350 (v349 doesn't save the new file) the files are ordered much better. Thanks to @maxmitti for the command.New file ordering of ModernCombat.c4f
with_optimization.mp4
without_optimization.mp4
I suggest that the dependencies of the foldermap and the foldermap itself are stored always near the start of the c4folder, before the other large c4 groups (c4s. c4d, c4g, c4f). This should be done by default trough c4group.exe
I also suggest to improve the reading of dependencies so that the order of dependencies in the foldermap.txt isn't a problem anymore and the c4folder must be read in only one time. @maxmitti is already aware of this issue.
The text was updated successfully, but these errors were encountered: