Current result is updated on every cursor movement
Cursor movements with left/right arrow keys, and with home/end keys (fn + left/right arrow on Apple laptop/wireless keyboards) should not update the "Current result" tooltip.
Moving the cursor does not intervene in the calculation itself and thus cannot affect the result; it is just a means to change the insert position, and should be prompt and never become extremely CPU demanding as it can now.
The phenomenon is easily reproducible: just type a calculation and then move the cursor through it, or better keep the left arrow pressed down to see to what extent it can affect the CPU usage. The more the operands, the higher the CPU usage (see attachments).
If those keys can be prevented from prompting an update of the "Current result", they definitely must.
OS X 10.11.6 MacBook Pro 5,2 (Early 2009)
Comments (7)
-
-
repo owner Yes, I was aware of the unnecessary painting updates to the result tip by using the arrow keys and similar. Though I had never measured the CPU load before. I can confirm the ~10% usage on Linux.
-
repo owner - changed milestone to 1.0
- changed component to editor
-
assigned issue to
- marked as major
-
reporter It might be a good idea to keep the update behaviour when the shift key is held down, to update the "Selection result" appropriately. Still, it would be better if it had a short delay, say half a second, to allow selecting without loading the CPU on each cursor movement.
-
repo owner - changed status to resolved
Fix issue
#708: Current result is updated on every cursor movement→ <<cset 9fa708468528>>
-
repo owner I found out that CPU usage comes from
QPlainTextEdit
itself. Fixed constant repaint of result tip by removing unnecessary timers in commit 9fa7084. -
repo owner - changed status to closed
- Log in to comment
Can anyone else reproduce this? On my machine (W7) keeping the arrow key pressed will raise the CPU usage by about 10%. It is not happening if the input bar is empty.