About the new "sorting lines feature": it takes a lot of time and causes high cpu usage to sort lines

  • bluemark

    bluemark - 2014-04-12

    Just one thing about the new "sorting lines" feature introduced in v6.5.2:
    it takes a lot of time and causes high cpu usage to sort lines
    (currently using Notepad++ v6.5.5 in win8.1 x64)

    To recreate:
    - open eg. a .srt file which ~10000 lines (160 KB),
    - press Edit>Line Operations>Sort lines on a file,
    - it takes (even with latest npp 6.5.5 with both Edit>Document Map/Function List and "word wrap" unticked) near 2 minutes to complete with cpu staying to 60% in a dual-core Intel @2GHz cpu.
    - pressing Undo afterwards, takes another ~15 seconds for the text to appear

    To have a reference,
    I tried sorting that file in another Scintilla-based editor: Notepad2 v5.0.26-beta4
    (Edit>Block>Sort Lines: Sort ascending)
    and it finishes instantly.

    Also, in portable gVim.7.4
    for the same file
    typing :sort
    completes instantly, in less than 1 second.

    Thank you

    Last edit: bluemark 2014-04-12
  • Andreas Jonsson

    Andreas Jonsson - 2014-04-14

    I agree, sorting even 200 lines of "1" causes noticeable lag on my computer.

  • bluemark

    bluemark - 2014-06-29

    I hope it will be fixed.

  • Andreas Jonsson

    Andreas Jonsson - 2014-06-29

    I looked at the sorting code briefly back in April and it was difficult to understand what was going on, but appeared to have quadratic performance.

  • Zen

    Zen - 2014-06-30

    use B-trees yall