4 March 2017 at 20:27 #124204
I have noticed that saving the state of line in “All matches” dialog window are broken. Earlier it opens on the same line that it hides on, but now it always change selection to the first line.
Now it’s hard to edit branches successively selecting them from “All matches” dialog window, because of loosing current edit state.11 March 2017 at 11:23 #124220
Ciao GenuZ, thanks I’ll fix this shortly!12 March 2017 at 19:42 #124226
Also I suggest to make a second Save and VACUUM menu – with “VACUUM REINDEX;”
I use this way of VACUUMing SQL base of CherryTree for a long time. It helps me to fix some visible lags after hard editing branches with over 600-700 lines.
After Save and VACUUM from menu lags are still existing, but after manual external “VACUUM REINDEX;” the database, lags in editing are lost for some time.13 March 2017 at 05:59 #124227
Can you explain the benefits of vacuming? Would it be better to enable this as a silent setting which optimizes the database on every exit if there are no dangers to the procedure?13 March 2017 at 13:45 #124231
It’s literally repack, rebuild and “defragment” database and fully delete data marked as deleted. It reduce the size of database and speed-up opening and browsing database.
I have several CherryTree databases over 2Gb. And after hard editing of it I noticed the reducing speed of this editing. Branches opens slowly (espesially with large amount of pictures in it), adding new branches lasts for 10 seconds.
Also some time ago I have problems with broken parts of databases (after cloud syncing) and vacuum helps me remove broken data from my databases.
Now I have ~70 Mb database with a lot of text, wich I edit often. And I noticed than removing and adding the parts of text in branch with over 500 lines can make some annoying lags even on simple text typing. Only VACUUM doesn’t helps with it, but VACUUM REINDEX solve my problems until next hard editing.
Using VACUUM every time is not expediently because of:
– longest “saving” time;
– more disk operations;
– more disk space for operations;
– and for some time, it make impossible to manual recover accidentally deleted data from database (because of vacuuming it on every save).
But VACUUM REINDEX helps in some important cases I wrote above. Giuseppe adds the “Save and Vacuum” menu after my feature request, but before that I VACUUM and REINDEX my databases with a linux/windows commandline, or by a script (weekly vacuums all my databases at once).
The way of adding this menus to CherryTree – is the way of more convenient vacuuming for all users, who not friendly with commandline.17 March 2017 at 00:13 #124235
Is VACUUM REINDEX much slower than simple VACUUM or is there any reason against me just always performing “VACUUM REINDEX” in place of the current “VACUUM”?17 March 2017 at 12:15 #124243
I think it’s mostly depends of database size and of it’s index state. But I didn’t noticed much time differences between VACUUM and VACUUM REINDEX.
It’s wisely to add REINDEX in “Save and Vacuum menu”, but not in save menu by default (like AntiNSA proposed).19 March 2017 at 22:19 #124244
I updated the save & vacuum command to perform also the reindex.
GenuZ I would appreciate if you could verify the change to work as expected, if you cannot test the git HEAD version I can pack a version for you, just tell me what OS you run cherrytree on.20 March 2017 at 13:19 #124245
Please make binaries/packets for Windows and Linux. I test them both.
I have arch-based distro (Manjaro), but I’ll try to make PKGBUILD for deb package. As I usually make it, when AUR package is too old.
Yes, I am dualbooter. An I not a programmer at all. 🙂21 March 2017 at 22:56 #12424725 March 2017 at 04:55 #124264
Sorry for long testing…
It works fine on Windows, but I have troubles on linux.
On linux cherrytree starts, opens database, edit it, but failed to “save and vacuum” or sometimes failed to save at all.
Here is console output:
Traceback (most recent call last):
File “/usr/share/cherrytree/modules/core.py”, line 1735, in file_open
File “/usr/share/cherrytree/modules/core.py”, line 1754, in filepath_open
if not self.reset(force_reset): return
File “/usr/share/cherrytree/modules/core.py”, line 2023, in reset
if not force_reset and not self.tree_is_empty() and not self.check_unsaved(): return False
File “/usr/share/cherrytree/modules/core.py”, line 3639, in check_unsaved
if response == 2: self.file_save() # button YES pressed or autosave ON
File “/usr/share/cherrytree/modules/core.py”, line 1578, in file_save
and self.file_write(os.path.join(self.file_dir, self.file_name), first_write=False):
File “/usr/share/cherrytree/modules/core.py”, line 1712, in file_write
self.file_write_low_level(filepath, xml_string, first_write)
File “/usr/share/cherrytree/modules/core.py”, line 1613, in file_write_low_level
File “/usr/share/cherrytree/modules/ctdb.py”, line 73, in pending_data_write
sqlite3.OperationalError: unknown database REINDEX
win destroy: runn_win found with id 0
I think it could be not installed correctly, because I’m not able to install deb package. It’s not compartible with package manager in my distro (pacman/yaourt).
But installing from git-master makes some errors for me. And I think it because my hands…
Could you give me a link to a tar.xz source package, because I can write this link directly in PKGBUILD and try to install cherrytree by my package manager (as I usually doing).25 March 2017 at 17:44 #12426725 March 2017 at 17:48 #12426825 March 2017 at 18:20 #124270
Yes, it’s work on both linux and windows!
I used cloned from git on linux and attached windows portable package.
P.S.: Saving state of “All matches” is also saving correctly! 🙂
Thanks!26 March 2017 at 10:51 #124273
New quick propose for “All Matches” window!
Please make ability to use hotkey to delete finded and selected line inside the “All Matches” window.
Because if I decide to delete several founded lines containing some text, I will open and close “All Matches” window for each time I delete line:
1. Select line in “All Matches” window;
2. Ctrl+Shift+A (hides window);
3. Ctrl+K (delete line);
4. Ctrl+Shift+A (opens window again).
But if Ctrl+K delete a line selected inside “All Matches” window (physically delete in branch!), this operation will be produced in one simple hotkey!
It will be so conveniently! 🙂
You must be logged in to reply to this topic.