TCMenu V1.9 Problem Update

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Jaguarist
Junior Member
Junior Member
Posts: 68
Joined: 2003-08-24, 10:59 UTC
Location: Central USA

TCMenu V1.9 Problem Update

Post by *Jaguarist »

After doing a lot of investigating today, I have found out what was the real cause of the extreme lag in response time.

As you will recall, it took Tcmenu approx 6-8 secs to appear after a button was selected.

It turns out the real reason for this was the time it took Tcmenu to read the individual icon files associated with the various buttons on the .bar file. My fullest .bar file has 67 buttons, with associated icons, in it.

So, it took Tcmenu about 8 secs to read those 67 icons. As a test to confirm this, I changed the icons on all 67 buttons to a test icon that was located within the TC directory.

Result is that Tcmenu now appears almost at once after the button is selected, having to only read that one icon file for all 67 buttons.

So, the real issue was not with the background virus scanner, nor with my file system setup, nor my video card.

Just the time it took Tcmenu to read those icon files.


So, VadiMGP, perhaps you could address this issue in your coding? I truly believe this is an EXCELLENT tool for TC, and would like to see it developed just a bit more towards reading the icon files faster, like TC somehow does in it's default state.

Thanks much for this forum, and the support of all you coders!! :-)

Jag
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

2Jaguarist TCMenu uses standard ExtractIconEx function and i don't see how code changes can impact on it's speed. I myself never used virus scanner, therefore i cannot say "for sure", but i think virus scanner is more probable cause for this delay.

Regarding your test. Of course, if you set all icons in the bar to the same icon it will significally increase the speed because Windows itself caches icons in RAM, so actually this test also eliminate most of virus scanner work.

AFIK TC stores icons for bars in special files (.br1 files) and load icons from these files when bar loaded.

BTW it very interesting to check what happens if you set your huge bar with 67 icons as default bar for TC and delete all .br1 files? Does it produce some delay in TC starting?
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2VadiMGP

As you possible know ExtractIconEx has the ability to extract all items of an icon library at once. I guess if a user stores all icons in a single icl file that are referenced in the bar file and you load the whole icl at once it will make loading much faster.
User avatar
Jaguarist
Junior Member
Junior Member
Posts: 68
Joined: 2003-08-24, 10:59 UTC
Location: Central USA

Post by *Jaguarist »

VadiMGP wrote:2Jaguarist TCMenu uses standard ExtractIconEx function and i don't see how code changes can impact on it's speed. I myself never used virus scanner, therefore i cannot say "for sure", but i think virus scanner is more probable cause for this delay.

>> Well, I take your word on it, because I am not a coder, and have no idea how these things work, as far as coding goes... :)



Regarding your test. Of course, if you set all icons in the bar to the same icon it will significally increase the speed because Windows itself caches icons in RAM, so actually this test also eliminate most of virus scanner work.

>> Funny you should mention that fact about Windows caching icons in RAM. Another lister here, who is becoming a friend, suggested that I try Cacheman to see if I could improve on the speed of getting the icons. I have installed it, and since that time, Tcmenu has improved it's speed on the large .bar file by about 98%!!



AFIK TC stores icons for bars in special files (.br1 files) and load icons from these files when bar loaded.

>> Thank you for this information, and you are, of course, correct! So, this lets me understand how TC can read all of those icons so fast, because they are already in that .br1 file.

Here is an idea..... Would it be possible for you to make Tcmenu read those .br1 files, without using the standard ExtractIconEx function? Like I said, I know nothing about coding, and that's why I ask you this question. :lol:



BTW it very interesting to check what happens if you set your huge bar with 67 icons as default bar for TC and delete all .br1 files? Does it produce some delay in TC starting?

>> I did as you asked me to do, and here is what happened. When TC started, it only took perhaps 1 sec longer to load that it usually does ( which is quite fast, btw ). When it did load, and I looked into the TC directory, there was a new default.br1 file created, which contained the 67 icon images.

Smart TC !! 8)

Jag
User avatar
Hacker
Moderator
Moderator
Posts: 13073
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Jaguarist,
the real issue was not with the background virus scanner
Why not? Now the virus scanner doesn't have to scan anything, because you assigned one .ico file, where both the facts that it is only one file and that it is an .ico file matter. Before, it had to scan ~67 .exe files.

But nice to hear it works fine now. :)

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Jaguarist
Junior Member
Junior Member
Posts: 68
Joined: 2003-08-24, 10:59 UTC
Location: Central USA

Post by *Jaguarist »

Hacker wrote:Jaguarist,

Why not? Now the virus scanner doesn't have to scan anything, because you assigned one .ico file, where both the facts that it is only one file and that it is an .ico file matter. Before, it had to scan ~67 .exe files.

But nice to hear it works fine now. :)

Roman
You do make sense to me. So, either it is the cache program, or the lack of NAV activity, or perhaps a combo of both that have improved performance.

And yep, I'm with you!! Just happy that it operates much faster now. :lol:


Jag
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Here is how Total Commander handles this problem: The extracted icons are cached in a file called default.br1 (for default.bar). In principle, this is just a bitmap with an additional header containing the background color, screen color depth, and a checksum of the default.bar file. The icons are re-extracted when one of these parameters changes. It would be nice if tcmenu could also somehow cache the icons (in its own file, of course).
Author of Total Commander
https://www.ghisler.com
User avatar
Jaguarist
Junior Member
Junior Member
Posts: 68
Joined: 2003-08-24, 10:59 UTC
Location: Central USA

Post by *Jaguarist »

ghisler(Author) wrote: It would be nice if tcmenu could also somehow cache the icons (in its own file, of course).

Absolutely. :!:
Post Reply