Onscreen IDE & dynamic instant update [_v0.5.4_]

UPDATE :
[X] improved text rendering optimization trick. Previously, for thousands of lines, when a document is displayed for the 1st time after starting the IDE, there is a little halt. It’s because I used 1 huge bulk of display scenegraph and used stash/unstash to display the onscreen text lines, so I had to operate on a large number of nodes. There is a bit halt for lines insertion/deletion operation too, since I had to shift the lines’ Z below the inserted/deleted ones. I found this halt too annoying, so I decided to go further in optimizing it.
Now the text lines are parented to a floating parent (not attached to the display scenegraph). Each onscreen text line is instanced to display scenegraph and placed at its Z as you scroll, or whenever needed, which only takes 0.001 second to complete. This way, I need to adjust the Z only for the onscreen ones, not the rest of them. …sayonara halt…
[X] added bookmark
What’s special :
1 the bookmarks are saved. Some IDE don’t do this. KomodoEdit does this, but if I don’t save the file, the marks will be saved anyway, resulting in incorrect position. I guess the authors forgot to make copy of the marks, and end up modifying the stored marks list, which is intended to be updated upon file save only.
2 some IDEs always allow navigation cycle, which I dislike since I can’t stop cycling at the 1st/last one. Some use config variable to enable/disable it, but don’t provide a way to jump/wrap to the opposite end.
What I like are, I can stop at the 1st/last one, and also able to wrap to the 1st/last one, without using config var to toggle this behavior, or using additional keymap (I’d like to spend my brain surface to store more important stuff). So, I did it this way : if the cursor is at the 1st/last mark, it’ll stop there. If you want to wrap to the opposite end, keep holding down the keys for at least 0.75 second. Once the cursor is teleported there, there’ll be another 0.75 sec delay to give you a chance to release those keys, so it won’t start jumping around aggresively.
[X] the cursor position and page scroll are also saved too
[X] added bam cache for the text. This works best with OPTIMIZE-TEXT-AT-LOADING set to True, since the memory consumption is linear to the nodes count. If you have alot of RAM, I guess you’ll be fine setting it False. For 5000+ lines, without bam cache, generating the text takes 12+ secs (50 secs if O-T-A-L is True). With cache, it’s loaded in < 1.5 secs. The text display is saved to bam on disk upon manual file save. Upon scene update, the saved files’ text display are only saved to bam stream in RAM, and will be written to disk at exit or upon file close, it’s just to minimize HDD hit. The file’s bam cache will be removed if you change the file outside the IDE.
[X] PauseResume module : now doesn’t pause IDE’s tasks, e.g. wxPython loop on Linux.