Hi vitncr,
I have a fix for this but I don't like it. I removed the mutex lock on parsing in Gumbo and that helped immensely but the problem is that updating all of the nodes in the tree takes too long (much too long) if that resource is open in a tab.
If I take your test case and open it (but do *not* open the second chapter with its 392 separate headings all in one file), and I run create TOC, it will now complete after a reasonable delay.
If however I open the second chapter in CodeView even if it is NOT the front tab, the process of building the TOC takes forever because after each change it is saved and when saved the CodeView widget immediately tries to reload, reparse, and re-highlight the entire new text even though it is not even in the front tab!
This is what created the problem and deadlock in the first place.
So I have to think about this a bit and find a better way to prevent the damn CodeView tabs from reloading the file until I am done with it. Since that one file has over 392 headings in it (and not just a handful) it gets reloaded and rehighlighted and reparsed over 392 times alone.
KevinH
Last edited by KevinH; 10-14-2015 at 11:33 PM.
|