#19 The new vertical "indent-lines" are re-drawn every time the cursor is moved.

None
fixed
orwelldevcpp
None
2014-08-20
2012-07-15
Extropian314
No

OS version: All
Error reported: Slowness
Stack trace:
Steps needed to reproduce the problem:
Hi, there should be an option to not-add the new "indent lines" feature in Orwell Dev-C++ (which draws verticle lines to display the extent of for-loops, if-conditions, etc).

The is the real bug: These vertical lines slow down the cursor movement to an extreme degree. Yes, for some reason, the vertical lines are re-drawn every time the cursor is moved by one character in any direction. Very strange, and obviously unneeded.
This makes scrolling (only over certain sections of my code) pretty tedious on any machine slower than a Core 2 Duo, roughly.

For what it's worth, I really like the new lines. At first I wasn't so sure about them, but now depend on them.

Discussion

  • orwelldevcpp
    orwelldevcpp
    2012-07-15

    • status: open --> accepted
    • assigned_to: orwelldevcpp
    • milestone: -->
     
  • orwelldevcpp
    orwelldevcpp
    2012-07-15

    Confirmed on my usual tests running Dev-C++ using a Phenom II at 800MHz.

    I've simplified the code quite a bit now, but it's still inefficient.

     
  • orwelldevcpp
    orwelldevcpp
    2012-07-15

    Can I send you test version containing faster painting code?

     
  • Extropian314
    Extropian314
    2012-07-15

    Great, sure; I'll monitor my SourceForge mail for that.

     
  • orwelldevcpp
    orwelldevcpp
    2012-07-15

    A general pre-beta disclaimer applies here: there are no guarantees that this version will not format your hard drive or do any other evil things to the stuff you edit with it. However, it's most likely that nothing weird will happen at all, because I use these version for everyday work. ;)

     
  • Extropian314
    Extropian314
    2012-07-16

    Tried-out #2. I want to say that I see some speedup, but it's only very slight, if I do. Still seeing a big slowdown when there are three indent lines on-screen.

    I haven't delved into the code... But I am literally seeing the indent-lines being "repainted" (even when they're nowhere near the moving cursor).. seems crazy.

     
  • orwelldevcpp
    orwelldevcpp
    2012-07-17

    @Extropian: I'm beginning to think that it's not the already optimized-to-death painting stuff that's to blame, but some form of code completion instead. Can you go to Tools >> Editor Options >> General >> Show mouseover hints, disable it, and try again?

     
  • orwelldevcpp
    orwelldevcpp
    2012-07-22

    Try this if you want. Please apply the mentioned disclaimer again, without the 'already properly tested by me' part. Simply put: please do not SAVE anything with this version.

     
  • Extropian314
    Extropian314
    2012-07-23

    1) "Mouseover hints" was already disabled.

    2) "optimized-to-death painting stuff.."

    Well, except that all of the lines on-screen are repainted every time the text-cursor is moved one space anywhere. I.e., very sub-optimal.

    This is still happening in the latest attached.

     
  • Extropian314
    Extropian314
    2012-07-23

    Also, not sure if this is relevant to you or not, but the status bar is not displaying anything (line-number, file-size, ..).

     
  • orwelldevcpp
    orwelldevcpp
    2012-07-23

    Well, it's displaying some debugging information. It's a testing version after all. ;)

    Also, I've found out that the flickering is happening since 5.2.0.0. I've figured out the whole client area of the editor is invalidated when the caret moves (that's what you've been reporting). Now all I need to do is diff the 5.1.1 and 5.2 sources and see what I messed up.

     
    Last edit: orwelldevcpp 2012-07-23
    • Extropian314
      Extropian314
      2012-07-24

      For what it's worth, that's confirmed here! The issue is `fixed' in 5.1.1 .

       
  • Extropian314
    Extropian314
    2012-07-25

    Very smooth scrolling and cursor-moving; no flickering of the lines; very nice.


    On a random note, the "Search->Goto Line" feature stopped working in a couple of these updates, inluding this latest one.

     
  • orwelldevcpp
    orwelldevcpp
    2012-07-25

    • status: accepted --> fixed
     
  • orwelldevcpp
    orwelldevcpp
    2012-07-25

    Alright, fixed both problems.

    About that last (random) one: for some reason I set the upper limit of the goto line input box to two and set CaretY to Max(text.lines.count,goto.input). Simply put: CaretY = Max(2,text.lines.count). The obvious fix was to remove the limit and get the Min() of the two parameters, so CaretY < lines.count.

    These kind of weird things usually happen when I'm busy debugging and I just plain don't think about the unfinished debugging done the day before or anything. ;)

    I won't bother you with the gory details of the painting stuff though.

     
    Last edit: orwelldevcpp 2012-07-25