#1052 Geany taking 10-15s to open 23MB file when wrapping is on



Seems I have encountered an unusal bug.

I run i3 Window Manager and use SpaceFM as my file manager and when I clicked on a log file I created for i3 bug tracking, Geany is taking every time on this particular file, 10-15 seconds to load. This happens every time, it's the only file I've ever seen such an extreme amount of lag to open something.

These are my specs;
Slackware 14.1 x86_64
Nvida GTX660m - drivers 331.67
Geany 1.24.1 (compiled from source)
i3 version 4.7.2 (from next branch)

I'm attaching the file i3.log causing the problem.

1 Attachments


  • SourceBugs

    SourceBugs - 2014-06-14

    Actually I meant to say when I click the file it takes 10-15 seconds before Geany appears on my screen and opens the file...

    Last edit: SourceBugs 2014-06-14
  • Colomban Wendling

    I can't reproduce here, the attached file opens instantaneously for me.

    Please try opening from the command line to get the file manager out of the picture, and if it doesn't help try with a clean Geany configuration (the -c Geany option). If a clean configuration help, please post your geany.conf.

  • Colomban Wendling

    • status: open --> pending-works-for-me
    • Found in: Unknown --> v1.24.1
  • Lex Trotman

    Lex Trotman - 2014-06-14

    Also can't reproduce, opens instantaneously. You compiled Geany yourself, how was it configured, what versions of glib and gtk, what computer are you running it on?

  • SourceBugs

    SourceBugs - 2014-06-15

    Ahhh I found the problem, in the Preferences - Editor - Line Wrapping

    Check mark the Line Wrapping and then try and open it and see what it does?

    As soon as I uncheck it, it opens right away, and if I enable the Line Wrapping it take like 10 seconds to open...

  • Lex Trotman

    Lex Trotman - 2014-06-15

    Its not unusual for large documents being wrapped to take much longer to open since the whole file needs to be rendered to determine the number of display lines which can change depending on the amount of wrapping. Wrapping can only be determined by rendering the text and checking if it is longer than the available space in the window.

    Without wrapping the number of display lines matches the number of physical lines and does not require rendering to determine.

  • Lex Trotman

    Lex Trotman - 2014-06-15
    • status: pending-works-for-me --> pending-invalid
  • Colomban Wendling

    • summary: Geany Taking 10-15 Seconds To Open 23MB File... --> Geany taking 10-15s to open 23MB file when wrapping is on
    • status: pending-invalid --> open-accepted
  • Colomban Wendling

    OK I can reproduce it with line wrapping turned on. And @elextr, I do think this is a bug in Geany because turning wrapping on after having opened the file is almost instantaneous, which means that "open+turn on wrapping" is faster (counting the user interaction) than "open with wrapping already on". This is weird and most likely is a problem in our side.

    Also, I just saw that the state of the "Line wrapping" menu item is inconsistent if the file is initially loaded with wrapping on.

  • SourceBugs

    SourceBugs - 2014-06-20

    Ok, look forward to the fix...


  • Lex Trotman

    Lex Trotman - 2014-06-20

    @colombanw as noted on IRC, turning wrapping on after the file is open and when the cursor is at the beginning only wraps the visible lines, not the whole file.

    The cause is that several actions that happen at open, whilst the cursor is at the end of the file, cause the whole file to be rendered. This includes showing line numbers in the margin and others. Again as noted on IRC it may be possible to re-locate the cursor to the start before these actions (so long as there is no dependence on the cursor location).


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks