View Single Post
Old 04-09-2021, 03:48 PM   #33
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,893
Karma: 6120478
Join Date: Nov 2009
Device: many
Okay,

I have pushed a bunch of stuff to master for testing to help speedup things:

1. Removed all of the secondary and third tests for well-formed because we check them all in advance now using multiple threads to do the checking.

2. temporarily disabled the id verification step as it really needs to detect if ids are being reused across the the files to be merged (because after merge that could result in duplicate ids).

3. Rewrote the merge code to use multiple threads for speed and to remove redundant checks

4. Added a bulk resource removal capability to FolderKeeper and the OPF to prevent reparsing the OPF a hundred or more times in a row when deleteing them one by one

5. Made loading Preview be asynchronous and no longer wait for loading to complete

Now to get the fastest time I do the following:

1) Use Preferences to turn *off* Spellcheck highlighting (red squiggley) in CodeView

2) Use Preferences to turn *off* the newly added highlight tag pair (as that requires reparsing the dom)

3) Preview can now be on or off as it seems to do little to impact speed (interestingly)

I added a bunch fo qDebug log messages to show what is going on during the merge so that timings can easily be done when in a debugger

The results show the bottle neck is now loading the over 43000 lines of Code into CodeView and then synchronously running the SyntxHighlighter.

The syntax highlighter has its own thread but still consumes much time since we wait for completion.

The only way to speed up editing any further is to disable syntax highlighting which would need a Preferences setting as well which we do not have (yet).

With this in places, what took over 2 minutes on my machine now takes about 15 seconds or so.

Any other speedups would come from completely redesigning how we do syntax highlighting which is not something I am prepared to do given the workaround above.
KevinH is offline   Reply With Quote