Number of EM-commands limitations
Moderators: Hacker, petermad, Stefan2, white
Number of EM-commands limitations
Hello.
I make main menu with 2089 items - 1937 em-commands + 152 cm-commands. Mnu-file size about 150 Kb. 2980 strings in main menu
There are permanent errors in the work of Total Commander - some commands do not work, and different every time.
When I remove about 50 menus - bugs disappear.
What are the limitations of the main menu - the number of commands/items, file size, or something else?
I make main menu with 2089 items - 1937 em-commands + 152 cm-commands. Mnu-file size about 150 Kb. 2980 strings in main menu
There are permanent errors in the work of Total Commander - some commands do not work, and different every time.
When I remove about 50 menus - bugs disappear.
What are the limitations of the main menu - the number of commands/items, file size, or something else?
Last edited by LonerD on 2015-07-19, 22:03 UTC, edited 1 time in total.
- ghisler(Author)
- Site Admin
- Posts: 50567
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
ghisler(Author)
Yes, I count all my commands and understand it yet.
2000 em_ commands - not only in meny, but summary (all commands loaded to memory from menu, button bars, etc...).
It very few. I have above 3000 em-commands that called from main menu, panels, submenus,scripts, etc).
For a long time I could not understand why it is one that the other command could not work. It very strange limitation.
Please, increase the number of EM-commands that can be called from TC. This would be a great innovation in the TC 8.50.
Yes, I count all my commands and understand it yet.

2000 em_ commands - not only in meny, but summary (all commands loaded to memory from menu, button bars, etc...).
It very few. I have above 3000 em-commands that called from main menu, panels, submenus,scripts, etc).
For a long time I could not understand why it is one that the other command could not work. It very strange limitation.
Please, increase the number of EM-commands that can be called from TC. This would be a great innovation in the TC 8.50.
Keep desire LonerD! Himself faced with this problem in 2010! Please remove nobody wants a limit of 2000 teams!
http://www.ghisler.ch/board/viewtopic.php?p=203926&highlight=#203926
Thank you for your understanding!
http://www.ghisler.ch/board/viewtopic.php?p=203926&highlight=#203926
Thank you for your understanding!
Dear author.
Any news?
Are you planning to remove limitation (or at least extend it to 4000-10000 commands) in the near future versions of TC?
If not - then I need to know to begin to alter the structure of my TC menu.
Any news?
Are you planning to remove limitation (or at least extend it to 4000-10000 commands) in the near future versions of TC?
If not - then I need to know to begin to alter the structure of my TC menu.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
- ghisler(Author)
- Site Admin
- Posts: 50567
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
In principle, it should be possible to inrease this number. However, I'm using a fixed array of pointers to the commands to store them, so it takes at least 4*number of commands in memory (8* in x64). Therefore I don't want to make this too large for the 2-3 people who need that many commands. I think that 10'000 is defintely too many, especially because you can't even define them due to the 64k memory limit per ini section...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
2Ghislerghisler(Author) wrote:..... I think that 10'000 is defintely too many, especially because you can't even define them due to the 64k memory limit per ini section...
To my knowledge this is not because you call a file .ini today that it have to strictly follow old 16bit rules... (back to windows 1.0

Why not having a flag that can extend this maximum size at startup and add an extend to your static array.
2LonerD
Also having 4000 or more useful commands is probably not the best practice if you really maintain them manually

You can do a lot of stuff dynamically if you use multiple bar / menu and update usercmd.ini on the fly using batch file and templates...
ghisler,
Why not to use dynamic array with unlimited size? When TC is started, it reserves space for e.g. 1000 items, and if it needs more, it adds another 1000 items to reserved size (i.e. allocates new larger memory block and copies already used items - any dynamic array supports it; you only shouldn't refer to items by pointers but by indexes) etc. So for most users TC will need to allocate 1000 items only once (so it will use 4 times less memory than now), and for some ones it will need to reallocate array some times. You don't even need to decrease reserve until TC close.
Why not to use dynamic array with unlimited size? When TC is started, it reserves space for e.g. 1000 items, and if it needs more, it adds another 1000 items to reserved size (i.e. allocates new larger memory block and copies already used items - any dynamic array supports it; you only shouldn't refer to items by pointers but by indexes) etc. So for most users TC will need to allocate 1000 items only once (so it will use 4 times less memory than now), and for some ones it will need to reallocate array some times. You don't even need to decrease reserve until TC close.
In increasing the number of teams interested in a lot more people than 2-3. I do not think that the elimination of restrictions in the code may take time, direct ... With all due respect to your work, I hope to expand or remove the limit in the number of teams.
Autor TCIMG
ghisler(Author)
Any news? To be or not to be?
Should we expect or in the near future it not planned to realize?
Any news? To be or not to be?
Should we expect or in the near future it not planned to realize?
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
- ghisler(Author)
- Site Admin
- Posts: 50567
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Thanks.Maybe, I haven't decided it yet.
I already remake my TC pack and reduce em-commands to 1950.
Othe commands I realize with popup menus created by program PopSel.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
UP topic =)Maybe, I haven't decided it yet.
Can we hope for more then 2000 em_ commands in TC 9.0?
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
- ghisler(Author)
- Site Admin
- Posts: 50567
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact: