Open NathanSmutz opened 7 years ago
Is this only happening in the most recent release?
I'll check; but I think I've seen symptoms like this, of varying intensity with other 2.#.# releases. I might have mentioned typing lag as a peripheral issue on another ticket. I'll see if I can find it.
1.3.2 (I believe the last one before the re-write) has a little bit of window-focus delay; but the typing keeps up.
Looks like I mentioned unpredictable typing lag for Nightcode 2.1.5 (Linux) in issue #201 (a main issue was fixed regarding behavior after hitting the return key). Typing lag is more intense now; but I think over the course of the 2.#.# generation it's generally been enough to send me back to 1.3.2. I had thought maybe it's just weak hardware; but, given that the CPU doesn't seem to be working hard, I suspect it's some kind of disk-thrashing issue.
Does this happen in large files or all files? Nightcode's editor runs in a webview so it certainly can be slow, but I've only experienced that in large files.
I think I've seen it bog down more with large files. What's the threshold where you've seen input lag on typing? 300 lines or so? I'll have to look and see if it's worse if the cursor is higher in the file. (Does parinfer only restructure from the cursor forward; or does it always scan the whole file?)
The slowness is not really from parinfer. The editor is slow for two reasons:
code->html
in paren-soup. Usually I only run it on the top-level form, though, not the whole file. So it will tend to be slow if the top-level form you are editing is really large (such as, a really long function).get-cursor-position
and set-cursor-position!
to do this in paren-soup, and I have to call them essentially every time you type something, because after applying the aforementioned syntax highlighting the cursor disappears and must be set again. It tends to be slower the further down in the file you are, because it is essentially starting from the beginning and counting how many characters down you are.
Maybe this is some kind of issue with Java memory management. This is running 2.3.7 (.jar version) on Windows 7 SP1 64-bit
When switching to the Nightcode window, it takes 5 seconds or more before the window fully takes focus and you can type or interact with it. Sometimes the icon on the taskbar has changed to a generic Java icon, and changes back when the window focuses. Input lag is another, possibly related, issue. When typing, particularly when parinfer is doing it's thing, lag between key-press and screen-response can get into whole seconds. The odd thing is that this happens with very low CPU utilization, and a bit of headroom on physical memory (memory usage in the 60s and 70s%).
Just in case this isn't normal, I think I've see the associated javaw task get as big as 700 megs in the task-manager. I might have spotted some heavy disk activity. Meanwhile, other open applications are performing reasonably.
I've seen milder but similar symptoms in another Java application, sometimes (SQL Developer), so that makes me suspect a Java angle. Maybe some kind of resource limitation issue?