My tray Icon is set up as a light weight "start menu" replacement with my most used programs and DOpus menu items in it, and it is very useful for me in this regard.
I've noticed that opening the menu after booting my computer is a bit slow (1-2 seconds). This happens the first time I right click on the tray icon after booting. It didn't happen with Directory Opus 12 - where the menu opened almost instantaneously. After opening the menu for the first time, all subsequent openings are fast, so I'm thinking there might be some initialization related thing.
Also, it seems that the more buttons I add to the menu, the slower opening it gets (first time after boot). Also opening the menu gets slower, if I add a lot of button evaluator clauses to the menu buttons - like so: @if:=selitems > 0 @async: "/programfiles/IrfanView/i_view64.exe" {filepath} @if:else @async: "/programfiles/IrfanView/i_view64.exe"
Seems that Directory Opus is slow to build the tray menu the first time. since the delay increases with more buttons and @if evaluator clauses, so probably they're being parsed or cached first time. the fact that every open after that is instant makes it feel like an init problem and not a render one.
None of those @if statements are cached, or even calculated just to show the menu.
It’s more likely to be the process of loading all the icons in the menu, and probably your antivirus scanning the files the icons come from the first time they are opened after a reboot.
Windows is also generally slow just after a reboot, as lots is happening, little is cached yet, and things like background services and other dependencies like network connections are still being established.
It can indeed be a Windows thing. My Win11 has often been weird, and I've had unexpected slowdowns after certain Windows updates before. For Antivirus, I only have the Windows built-in one, but it scanning all the programs in the menu could be the cause too. My tray icon menu has 25 buttons loading icons from 3rd party programs, and a bare-essentials DOpus Menu with 15 buttons (icons from the built-in set), so getting the icons from all of them could also slow things down. I must have been mistaken with the @if statements. It is hard to gauge what individual things might slow things down.
I have noticed that opening the tray icon menu for the first time is slow even 10 minutes after boot, so it shouldn't be about Windows startup stuff, but can indeed be because of first time loading the icons, antivirus, or something like that.
Is there any way to force DOpus to do all the initial loading/caching/etc. (that happens when you first right click the tray icon) when the tray icon is loaded? If not, would this be an acceptable feature request?
Lastly. I want to thank everyone in the DOpus team for developing this wonderful piece of software. It is literally the most important single program for my PC, and the first one I install after a fresh Windows install. Cheers!
If you're pulling the icons directly from the executables files, this could also slow things down, since this can trigger your antivirus.
As a general rule, I would advocate to extract the icons from the executables (or dlls) to a user folder (for instance /dopusdata/User Data or a subfolder), and use these as icons for your toolbars instead.
Pulling icons from the executables files was indeed the culprit. I changed all the program icons to be those from the internal icon set, and the menu is fast again after boot. Thank you, good people for the help.