Number of EM-commands limitations

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Number of EM-commands limitations

Post by *LonerD »

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?
Last edited by LonerD on 2015-07-19, 22:03 UTC, edited 1 time in total.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC 8.x supports a maximum of 2000 em_ commands.
Author of Total Commander
https://www.ghisler.com
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Post by *LonerD »

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.
User avatar
Andrey_A
Junior Member
Junior Member
Posts: 12
Joined: 2010-06-02, 21:44 UTC
Contact:

Post by *Andrey_A »

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!
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Post by *LonerD »

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.
"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
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

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
User avatar
nsp
Power Member
Power Member
Posts: 1827
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

ghisler(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...
2Ghisler
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 :shock:)
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...
User avatar
MVV
Power Member
Power Member
Posts: 8704
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

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.
User avatar
Andrey_A
Junior Member
Junior Member
Posts: 12
Joined: 2010-06-02, 21:44 UTC
Contact:

Post by *Andrey_A »

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
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Post by *LonerD »

ghisler(Author)
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
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Maybe, I haven't decided it yet.
Author of Total Commander
https://www.ghisler.com
bladesart
New Member
New Member
Posts: 1
Joined: 2013-11-07, 19:52 UTC

Post by *bladesart »

Good evening!
saw the topic and decided to write here. In my opinion, any limitation - it is wrong. I am here to work must also be a large number of teams - folders, projects, graphics, editors, panels ... And to all need quick access. So I am for the removal of restrictions
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Post by *LonerD »

Maybe, I haven't decided it yet.
Thanks.
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
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Post by *LonerD »

Maybe, I haven't decided it yet.
UP topic =)
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
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will consider it.
Author of Total Commander
https://www.ghisler.com
Post Reply