Jean Lalonde Support Forum

Full Version: Display of menu (sometimes) VERY VERY slow
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Display of QAP menu is sometimes VERY VERY slow (10 to 20 seconds to display it)
It's not always the case, but I would say once out of 5 to 10 times

To be sure, I have already  verified that the option to display icons for frequent files/folders is UNchecked.
And I have reduced the maximum number of subfolders for active folders. (and it's during these tests I have discovered it was not feasible to remove the "Active" folder parameter : see my other post)
But in any case, when menu takes this very long time to display, it is NOT at the same time that active folders are refreshed (I set the optional sound at refresh to be sure).

And when the menu takes so long to refresh, all other applications on laptop are OK and respond normally. And nothing special (neither CPU consumption, nor disk) is visible at task manager. Sounds more like a kind of "lock".

Since I saw that the QAP-Frequent DB was quite "big" (2876K), I tried to remove it : no change

I do not remember to face this issue before today....
I even tried to restart my laptop : no change.

If there is a mean to activate a kind of monitoring of what QAP does, I guess it could be useful to understand what happens....

Oops, I just saw in QuickAccessPopup.ini file a DiagMode=0
So I set it to 1, and now, if I do not know WHY there is an issue, I at least know WHERE is the issue : According to QuickAccessPopup-DIAG.txt file, when menu takes so long to display, 99.99% of time is spent in RefreshRecentItemsMenus.

Typically, when response time is OK, Diagfile contains
20191207@11:37:55.560 LaunchHotkeyMouse START-SHOW 2829375
20191207@11:37:55.591 RefreshSwitchFolderOrAppMenu START 2829406
20191207@11:37:55.716 RefreshSwitchFolderOrAppMenu STOP 2829531 125
20191207@11:37:55.716 RefreshClipboardMenu START 2829531
20191207@11:37:55.716 RefreshClipboardMenu STOP 2829531 0
20191207@11:37:55.716 RefreshPopularMenus START 2829531
20191207@11:37:55.732 RefreshPopularMenus STOP 2829546 15
20191207@11:37:55.747 RefreshRecentItemsMenus START 2829562
20191207@11:37:55.763 RefreshRecentItemsMenus STOP 2829578 16
20191207@11:37:55.763 RefreshDrivesMenu START 2829578
20191207@11:37:55.763 RefreshDrivesMenu STOP 2829578 0
20191207@11:37:55.763 LaunchHotkeyMouse menu name Principal 2829578
20191207@11:37:55.763 LaunchHotkeyMouse STOP-SHOW 2829578 203

and when it's NOT OK, it contains :
20191207@11:38:15.383 LaunchHotkeyMouse START-SHOW 2849203
20191207@11:38:15.383 RefreshSwitchFolderOrAppMenu START 2849203
20191207@11:38:15.540 RefreshSwitchFolderOrAppMenu STOP 2849359 156
20191207@11:38:15.540 RefreshClipboardMenu START 2849359
20191207@11:38:15.555 RefreshClipboardMenu STOP 2849375 16
20191207@11:38:15.555 RefreshPopularMenus START 2849375
20191207@11:38:15.571 RefreshPopularMenus STOP 2849390 15
20191207@11:38:15.571 RefreshRecentItemsMenus START 2849390
20191207@11:38:36.646 RefreshRecentItemsMenus STOP 2870468 21078 *FLAG4*
20191207@11:38:36.646 RefreshDrivesMenu START 2870468
20191207@11:38:36.661 RefreshDrivesMenu STOP 2870484 16
20191207@11:38:36.661 LaunchHotkeyMouse menu name Principal 2870484
20191207@11:38:36.661 LaunchHotkeyMouse STOP-SHOW 2870484 21281 *FLAG2*


Help doctor ! What can I do ?

Last (but maybe not least), since now I understand it's NOT linked to Active Folders, I wanted to uncheck the box relative to bip at refresh, and restore the maximum number to its default value (500), but when I clicked on "Enregistrer", I got this error message box :

  Error : Menu name too long.
         Line #
  ---> 3621: Menu,%strMenuName%,Add
  The current thread will exit.

I then (after restart of QAP) tried (in parameters) to de-activate QAP database.... but no impact : Issue still there.

Since no impact, I reactivated it.
But when I tried to click on "Vider les items fréquemment utilisés de la base de données" , I got an error message

SQLite FLUSH Error
Message:
Code:
Query: DELETE FROM Usage;
Since it seems to be linked to recent/frequent files/folders management, I removed from my menus all entries relative to either recent or frequent, files or folders.

And since this last manip, QAP works fine....
(2019-12-07 06:24)LaurentG Wrote: [ -> ]Since it seems to be linked to recent/frequent files/folders management, I removed from my menus all entries relative to either recent or frequent, files or folders.

And since this last manip, QAP works fine....
At least in my configuration the Recent Files and Folder don't cause any large delays
and I use them often.
May be some of the Recent entries point to unavailable network resources in your case ?

I've never used Frequent files and folder as it doesn't gives me any benefit.
For this reason I also have disabled the database.
Actually, I guess that database was "broken" somewhere.

I have eventually
- stopped QAP
- restored all parameters and favorites of QAP as they were initially,
- and restored a backup of the database made 2 or 3 days ago.
- then restart QAP
And everything works fine, as usual....

Jean : Could you confirm that (according to elements I provide in my initial post) an issue with database itself could explain.
And maybe, in such a situation (errors that lead QAP to display *FLAG4* and *FLAG2* in the debug log), have a message to the user inviting him to some action on database, rather than to stay almost "blocked" as I was, with a QAP almost un-usable.
Hi Laurent,

> Display of QAP menu is sometimes VERY VERY slow (10 to 20 seconds to display it)
> It's not always the case, but I would say once out of 5 to 10 times

This is not good...

> To be sure, I have already verified that the option to display icons for frequent files/folders is UNchecked.

This would have been my first suspect...

> it is NOT at the same time that active folders are refreshed (I set the optional sound at refresh to be sure).

You are correct. Live Folders ("Dossiers actifs", in French) are refreshed by a background task. They are not refreshed each time the menu is displayed. So, this cannot be related to the delay issue.

> Since I saw that the QAP-Frequent DB was quite "big" (2876K), I tried to remove it : no change

3 MBs is the default maximum size for the database. This is not that "big". When you say you tried to remove the database, do you mean you deleted QAP_Frequent.DB or you only disabled it by uncheking the top checkbox in Live Folders tab?

>According to QuickAccessPopup-DIAG.txt file, when menu takes so long to display, 99.99% of time is spent in RefreshRecentItemsMenus.

In my experience, this situation occurs when QAP tries to retrieve icons for recent files that reside on a network drive that is not online. Would you have an offline drive? Or an unplugged USB key?

> Since it seems to be linked to recent/frequent files/folders management, I removed from my menus all entries relative to either recent or frequent, files or folders.
> And since this last manip, QAP works fine....

This was what I was going to suggest. QAP will not refresh these menus if they are not used. This confirms the issue is related to this menu. But this is not a solution if you want to use these dynamic menus.

> Error : Menu name too long.
> SQLite FLUSH Error

Sorry. I tried but I could not reproduce these errors... Your database probably got broken at some of your tests. What you did to restore it was OK. To start from fresh, you could also do: 1) disable the database, 2) delete the database file and 3) re-enable the database.

>Could you confirm that (according to elements I provide in my initial post) an issue with database itself could explain.

Since restoring the database with a 2-3 days backup solved the issue, it could mean that some files added to your database in the last 1-2 days were for files that became unavailable to retrieve icons. Would you have some offline network drives or external resources like USB key?

Thanks Laurent for all these detailed infos about this issue.

And thanks Horst for your input.

Jean
Hi Jean,

Actually, I am more and more convinced that my issue was due to a corruption of sqlite database.
One of the reasons that lead me to this conclusion is the "SQLite Flush Error" I got. By definition, this kind of error is fully "compatible" with database corruption hypothesis.
Maybe, a second reason could be the other error message "Menu name too long" if this error can be linked in any way to database access. Personnaly, I don't know, but maybe you can see (thanks to full error message) where this error occurs in the source, even if you cannot reproduce it.

And last but not least, I just did a test, fulfilling the database with entries relative to a USB disk (using QAP to fulfill the database, not "artificially"). Then I have ejected the disk, and restart everything : this led to abolutely no bad response time with QAP, even if most of the recent files / recent folders were no moreaccessible, and the same for a lot of Frequent Files/Folders.
Your app seems to be "robust" against no more accessible folders / files.
On the other hand, maybe it does not manage efficiently if sqlite database is corrupted.

Personnally, I stop here my investigations. If the issue occurs again in the future, I'll stop QAP and keep a copy of the database before any restoration (what I missed to do this time) to be able to investigate it in detail.
But if it was really a database corruption, I do the bet it won't arrive again.
If it was nevertheless the case, I'll keep you informed.

Regards
Laurent
Hi Laurent,

> Actually, I am more and more convinced that my issue was due to a corruption of sqlite database.
> Personnaly, I don't know, but maybe you can see (thanks to full error message) where this error occurs in the source, even if you cannot reproduce it.

The error message tells me where the error was detected but it won't help identify the cause unfortunately. But, at least, this situation seems to be very rare.

> Your app seems to be "robust" against no more accessible folders / files.

I don't remember what tests I've done with unplugged USB drives (it was a long time ago) but it seems that QAP/Windows can quickly identify when a drive is not available. But I remember that network drives unavailability is a real issue. The only way QAP could detect that a network file is not online is to try to access it. And accessing a file when it is offline cause a very long delay (+/- 20 sec.). If anyone has more experience using AHK with network resources, let me know.

> Personnally, I stop here my investigations.

Thanks for your time. Let me know if it happens again, and if it does, send me your database and I'll investigate.

Jean