![]() |
#46 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Try selecting the view/VL using the View Manager menu. I don't see the delay there. |
|
![]() |
![]() |
![]() |
#47 |
Connoisseur
![]() ![]() Posts: 61
Karma: 198
Join Date: Feb 2022
Device: Kobo Sage (prev. Kindle PW5)
|
Right... Even when I've uninstalled Action Chains, or disabled it, I still have the delay when manually selecting the view in the VM menu...
|
![]() |
![]() |
Advert | |
|
![]() |
#48 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#49 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
![]() |
![]() |
![]() |
#50 | ||
Connoisseur
![]() ![]() Posts: 61
Karma: 198
Join Date: Feb 2022
Device: Kobo Sage (prev. Kindle PW5)
|
Quote:
Ran another test just now -- uninstalled Action Chains, still getting the exact same lag when CTRL+Tabbing between my views. And the same rattly sound BR mentioned they get too (below) Quote:
I think you misread my post -- that's what I'm doing. Picking the View Manager view from View Manager's dropdown menu. |
||
![]() |
![]() |
Advert | |
|
![]() |
#51 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
The delay is very obvious when I click on a tab. That delay is gone if I click on the View Manager menu or use CTRL+Tab. At this point I give up. There are too many uncontrolled variables. |
|
![]() |
![]() |
![]() |
#52 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
The delays I've seen have on been on VM switching, no delays on Virtual Library switching. And hooking VLs into VM views makes no difference. Curious : Where does Action Chains put its 'stuff', I couldn't see any additional tables in the database or in the metadata_db_prefs_backup.json file. BR |
|
![]() |
![]() |
![]() |
#53 | |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Quote:
and also a CALIBRE_CONFIG_DIRECTORY\plugins\action_chains\ subfolder |
|
![]() |
![]() |
![]() |
#54 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I couldn't help it -- given that action chains appears not to be involved I had to look further into this and I (think I) found the problem.
The VM calls gui.apply_state() (action.py line 341). One of the things that apply_state() does is reposition the columns as requested by the new state. Whenever a column is repositioned the method calls save_state(). Unfortunately for performance, jnikkir's views reposition columns a lot, resulting in a lot of save_state() calls. I made a test version of apply_state() that calls save_state() once no matter how many columns are repositioned. That cut down the number of save_state() calls to 2, one in apply_state() and one in the VM (a direct call to save_state() on line 343). As the VM is going to save the state anyway, even that first save_state() isn't needed. I am thinking about adding a parameter to apply_state() telling it whether or not to call save_state() even that one time. The VM can use this parameter to get rid of the extra save. It will need to condition using the parameter on calibre's version to maintain compatibility. I will submit changes to Kovid once I am convinced I haven't broken anything. |
![]() |
![]() |
![]() |
#55 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Since I switch views/VLs a lot and have noticed a slight delay on it, I'll be testing it once the PR gets approved.
![]() |
![]() |
![]() |
![]() |
#56 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Note: my changes don't affect the .25 sec - .75 sec delay that action chains inserts when processing a "VL changed" event before calling the view manager. The delay is quite visible.
The comments in the action chains code say that the delay is there to improve performance. I leave it to others to decide whether the lag is worth the performance improvement. It might not be once the extra save_state() calls are removed. |
![]() |
![]() |
![]() |
#57 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
![]() |
![]() |
![]() |
#58 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Installed. There's a huge performance improvement. Changing VL tabs with the action chain to switch views is now nearly instant while before there was a slight but noticable delay.
Last edited by ownedbycats; 03-08-2022 at 07:43 AM. |
![]() |
![]() |
![]() |
#59 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
I'm willing to make such a change to View Manager, but it's a bit of a nuisance--right now at least.
calibre/master branch won't run from source for me using 5.38 binaries, gives: Code:
File "C:\Users\me\Desktop\nook\calibre\src\calibre\gui2\dialogs\choose_format_device_ui.py", line 9, in <module> from PyQt6 import QtCore, QtGui, QtWidgets ModuleNotFoundError: No module named 'PyQt6' And the calibre/qt6 branch doesn't have save_state yet. So VM can't use calibre version >5.38 to decide when to call with save_state=False, has to do try: call() except TypeError: |
![]() |
![]() |
![]() |
#60 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
I know of two ways to force rebuilding the files:
Last edited by chaley; 03-08-2022 at 12:12 PM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extremely slow in long files | arspr | Editor | 11 | 06-26-2014 06:22 AM |
[Old Thread] Why is Calibre so slow sending ebooks in emails? | rfog | Calibre | 10 | 05-17-2013 01:42 PM |
This long thread title is intended to reflect my thought's incredible complexity. | Prestidigitweeze | Lounge | 11 | 04-20-2012 06:28 AM |
[Old thread] Calibre really slow | spaze | Calibre | 15 | 03-24-2011 04:04 AM |
[Old Thread] Slow to 'get list of books on device' for Kindle DX | tklaus | Devices | 4 | 03-10-2011 12:11 PM |