Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#165 2 minutes with 100% CPU before starting !!!

None
closed-out-of-date
nobody
General (289)
Unknown
5
2013-11-24
2008-06-16
Tarias
No

Geany 0.14 on Windows XP SP3

I have a code project in PHP with 97 files open in windows (with a mean of 500 lines of code per file).

When i close and start again (or on first start after system reboot), geany takes almost 2 minutes (100% CPU, cpu=Pentium M 2.26Ghz) to load !!!

This started to happen on 0.13 and also now on 0.14.
0.12 was ok (i always used the same project files) !!!

Also, note that I've done an ABSOLUTE CLEAN INSTALL of 0.14

Thank you (for your attention here, and also for this excellent cross platform text editor)

Discussion

  • Enrico Tröger
    Enrico Tröger
    2008-06-19

    Logged In: YES
    user_id=1117045
    Originator: NO

    Geany on Windows is slow...it wasn't designed to run on Windows and using GTK on Windows is significant slower than natively on Unix-like systems.
    Then, opening 97 files at once slows it down even more. Thus, this should and maybe will be improved in future.

    I doubt Geany 0.12 did start significantly faster but it would be interesting what has changed to cause a change in startup speed.

     
  • Nick Treleaven
    Nick Treleaven
    2008-06-19

    Logged In: YES
    user_id=1268692
    Originator: NO

    I think it probably shouldn't take that long on a modern machine. I'm not sure what the cause of this is, I might run some tests next time I'm in Windows. It reminds me of the exponential-colourise bug, but I thought that didn't occur now. I'm going to rewrite the delay_colourise code so maybe this bug will be fixed in 0.15.

     
  • Tarias
    Tarias
    2008-06-20

    Slow opening files (1_3)

     
    Attachments
  • Tarias
    Tarias
    2008-06-20

    Logged In: YES
    user_id=2120133
    Originator: YES

    Thanks for the feedback guys...
    I was surprised by 2 things:

    [ntrel]: "I think it probably shouldn't take that long on a modern machine"
    Well...not sure what you meant by this; anyway, even if my machine was "top modern" 2 years and half ago, the fact is that the same 97 files are opened in 4 seconds using (for example) editplus (the text editor I used before geany)!

    [eth16] "Geany on Windows is slow...it wasn't designed to run on Windows"
    I won't argue that...by as a user of geany, I'd say (my opinion) that you guys should really "think twice" here.
    I've tried lots of aproaches for developing in XAMP (and I mean the X); rejecting by option very "fancy" but not "so cross platform like that" IDE's, I came across Geany...which always have impressed me by it's "overall functional performance" and for "delivering me all what i want" !
    I think like me, in the real world "windows dominated" but with "Linux always gaining a bit more field", lots of people are joining the growing snowball of the "cross development side".
    So my point: even if it was not planned to be so, Geany IS a very good X (cross platform) editor.
    (...)

    Now, returning to the bug, there's something (in fact, lots) more to add...
    1 - I think i was "multitasking to much" the day I submitted this bug file...it was not 2 minutes CPU 100%, but 4 MINUTES (see pictures attached: "slow_opening_*")

    2 - Geany has problems not only opening files (again: clean install, "clean machine", XP SP3 Pentium M 2.26GHz) BUT ALSO SAVING THEM...In this test, i just changed 1 char in each file (total 5 files size: 351.851 bytes)
    (see pictures attached: "slow_saving_*")
    Whhoaa: 20 seconds saving 5 files with only 1 char diff from last save ?!?
    And more: during this time, windows "REALLY freezes" (not like some process who is just consuming all CPU it can get)...so: at least one part of this bug should be "system call related" !
    Can this be related with bug in 1) ?...

    Sorry for not posting all this info before, but it really escaped me the first time.
    And again, I can assure you: nothing of this was happening with 0.12...it started on 0.13 (at least, the "slow starting"), and continued now on 0.14 (where also occurs the "slow saving")

    If there is some data more i can submit to help solving this, just tell me what to do.

    (Now, I'll try to upload the 4 small pictures i mentioned: 3 snippets for the slow opening, where you can see the 4 minutes by yourselves; and also, one with the save problem)

    Finally...offtopic, I know; but hey: Portuguese are know, among other things, for fairplay !
    So here goes to (possibly) the two of you:
    " - Good luck either with Croatia/Turkey !!"
    ;)

    Cheers

    File Added: slow_opening_1-3.jpg

     
  • Tarias
    Tarias
    2008-06-20

    Slow opening files (2_3)

     
    Attachments
  • Tarias
    Tarias
    2008-06-20

    Logged In: YES
    user_id=2120133
    Originator: YES

    Slow opening files (2_3): notice the file highlighted, and it predecessor/sucessor: 40 seconds to open 3 files ?!?!
    File Added: slow_opening_2-3.jpg

     
  • Tarias
    Tarias
    2008-06-20

    Slow opening files (3_3)

     
    Attachments
  • Tarias
    Tarias
    2008-06-20

    Logged In: YES
    user_id=2120133
    Originator: YES

    File Added: slow_opening_3-3.jpg

     
  • Tarias
    Tarias
    2008-06-20

    Logged In: YES
    user_id=2120133
    Originator: YES

    File Added: slow_saving.jpg

     
  • Tarias
    Tarias
    2008-06-20

    Slow saving example

     
    Attachments
  • Nick Treleaven
    Nick Treleaven
    2008-06-20

    Logged In: YES
    user_id=1268692
    Originator: NO

    Hi,
    Thanks for all the extra information.

    BTW I wasn't suggesting your machine isn't modern, I was agreeing with you that this is likely to be a bug.

    The extra information and status messages for Save All were interesting, it makes it more likely that this is related to colourising typenames much too often, as only the PHP files take several seconds each to save, the XML files seem to save quickly. PHP has session typename highlighting, but XML doesn't.

    I've been working on making colourisation happen only when each editor is drawn, instead of colourising the whole session at once. So it seems likely to me that this bug will be fixed in the next release. I'm curious as to why it happens with the current release, but it definitely seems to be happening.

     
  • Tarias
    Tarias
    2008-06-24

    • priority: 5 --> 6
     
  • Tarias
    Tarias
    2008-06-24

    Logged In: YES
    user_id=2120133
    Originator: YES

    ntrel:

    Ok, i wasn't sure what you meant...By today's standards, my machine is indeed slow (2 years and a half, can't decode bluray, ...); by by no means this would be an "excuse" for one editor (even though now I know it's not "windows optimized/native") to take 4 minutes in doing the same other "similar capabilities editor" took 4 seconds !
    But now, all clear here!

    Glad i could help with the extra info: should have put it here in the first place/post...and yeah: php has a lot o SHL; IN xml files, except for header (ex: <?xml version="1.0" encoding="ISO-8859-1"?>) and comments, it's all "black&&blue"(as it should: 2 colors for tag&&content)

    And "believe me": I even tried to uninstall 0.14 and "back to good old 0.12": all fine there !
    But since I like (when it's feasable) to keep software updated, I'll stick with 0.14 and upgrade to 0.15 when you guys have it ready: if you don't hear from me then, no news is good news ;)

    I still find it so very odd that no one reported this previous than me: eth16 was probably right when he stated "it wasn't designed to run on Windows" (and probably implying that most of your users use geany in Linux)...but I'll be damned: i have just the opposite idea from what I keep observing (most hard core "linuxers" just go for vim, emacs, joe, ...); and really, it would be such a waste not to take advantage of geany running so good and "packing all we want from a lightweight but powerful programming text editor" in both windows and Linux.

    Also, thank you for your quick feedback.

    Cheers

     
  • Enrico Tröger
    Enrico Tröger
    2008-06-28

    Logged In: YES
    user_id=1117045
    Originator: NO

    Just a quick idea:
    Are your files all UTF-8 encoded or do they have a different encoding? ISO-8859-* or something similar?
    Background: when opening files, Geany checks the file's encoding and if it is UTF-8 all is fine and the file is opened. If it is not UTF-8, Geany first has to detect the file's encoding and then convert it into UTF-8.
    So, if your files are not UTF-8 encoded, this is an additional slowdown at least when opening files (the slowdown of non-UTF-8 files when saving is not that signifcant).

    Additionally, Nick's latest changes in document colourisation are great, makes Geany feel much more smoothly.

    And of course, there is no question that opening files taking two minutes is a no-go. OTOH Windows is a little hard to support for us as we usually develop Geany on Linux. The only reason why I have a virtual Windows installation is to create Windows binaries of Geany...:D.
    Maybe I'll provide a new Windows snapshot soon to test latest changes.

    > Finally...offtopic, I know; but hey: Portuguese are know, among other things, for fairplay !
    Hehe, except for Ronaldo...:D (SCNR)
    In contrary to the match of the German team against Turkey, the match against the Portuguese was a good one, they played both well and hmm, one team must win :D.

    > So here goes to (possibly) the two of you:
    > " - Good luck either with Croatia/Turkey !!"
    I'm excited about the next final match, I guess Spain will win...but that's cool as long as they play better.

     
  • Tarias
    Tarias
    2008-06-29

    • priority: 6 --> 5
     
  • Tarias
    Tarias
    2008-06-29

    Logged In: YES
    user_id=2120133
    Originator: YES

    eth16:

    Unfortunately, most of my files are ISO-8859-1, and only some of them are in UTF-8 (yeah, caught me in the middle of multi-lang upgrade !).So...seems background applies !
    I don't want to be a "pain in the ass", but again (aarrggh: hope is the last time i say this :) :P ): conditions were the same in 0.12 (just insisting because maybe one of you 2 guys would have "the flash" on what was the change responsible for this...already there were some "shots" at it!).

    And ok: as I already suspected, you 2 guys are by nature "hard linux power users" (really: I also try to afford my self that "luxury", as for working, I prefer linux environment (and for fun, games in particular: well...$M)...but you guys go tell that to my clients: some of them buy it (switch to and/or fresh linux start), some of them are begging to buy it...but a great majority has $M at genoma level, I think :P ).
    Just to say (and stress) here why I think that your project should never "be worse" on windows (even if was not "nature base designed", you guys feel tempted because would advance with geany's freatures faster on linux, etc...): BECAUSE GEANY, IN MY OPINION, HAS WHAT IT TAKES TO DELIVER IN BOTH SIDES (sorry caps, but no bold here).

    [OFFTOPIC]:
    Ronaldo: yeah, forgot to mention that...but you could forgive the kid that one...don't know if you've seen it, but the guy is just "amazing": he would leave real angry if his "team in training" would not win the "final mini game": can you believe that ?!?!
    The guy is just like Mourinho: "I am the best", "I am the special one", "I WANT TO WIN IT ALL, EVEN WHEN IT'S A FRIENDLY WITH MY TEAMMATES": ROTFLOL !!!

    As for your guess (spain winning)...
    YEAH, RIGHT: GERMAN NOIR SENSE OF HUMOR ?!?!?!
    Most of you always keep saying during the euro that "we have no big team", "others are always gonna win"...but in the end, ALL THAT GOT YOU TO FINAL !!!

    :::PPPPPPPPP

     
  • Enrico Tröger
    Enrico Tröger
    2008-06-29

    Logged In: YES
    user_id=1117045
    Originator: NO

    In Geany 0.13 we introduced the encoding detection based on so-called "encoding cookies" (e.g. "# coding: utf-8") and charset specifications in HTML files (e.g. "<meta http-equiv="content-type" content="text/html;charset=utf-8" />").
    Maybe it's related to this detection that it actually slows down opening the files instead of speeding it up. You can easily test whether this is the bottleneck: open the preferences dialog -> Files -> "Use fixed encoding when opening files" and choose Utf-8 in the combo box below.
    Then re-open your files or restart Geany. This option disables all encoding auto-detection and open files as UTF-8 (this will break the display of non-UTF-8 files, use this option only for testing!).

    [OFFTOPIC]:
    > Ronaldo: yeah, but you could forgive the kid that one

    Hehe sure, I really was only kidding. It was a good match and there can be only one winner and there must be a looser.

    > Most of you always keep saying during the euro that "we have no big team", "others are always gonna win"...but in the end, ALL THAT GOT YOU TO FINAL

    It seems to work, haha.

     
  • Tarias
    Tarias
    2008-07-01

    Logged In: YES
    user_id=2120133
    Originator: YES

    eth16:

    Nice try (auto-detect)...but now, for what we've discussed, all my hopes rest in the "colorization schemes".
    I'll wait to see what happens in 0.15.
    If you guys don't add here nothing more, i won't bug you more with this bug !

    (But hey: in case you are already missing me, rest assured: 2 more bugs on the go ! I'll post right away).

    [OFFTOPIC]:

    Don't you have the feeling that something (malicious quoting:) "stooped to work" last sunday ?!?

    [OFFTOPIC2]:
    Shame on we users of geany...none you you 2 had not even a donation yet ?!?!?
    I wish I was not sssoooooo broke at this time...
    But I'm trying to change that...and geany has been a part of it.
    As soon as I got there...it's a promise !

     
  • OK, it's a bit late (4 years, hell). Though, this should have been fixed by the time I think -- at least on my Linux machine a 371-files project opens in a few seconds. I can't test ATM on Windows but I guess there won't be a so huge difference between the platforms even if the perfs on Windows weren't as good as on *NIX.

     
    • status: open --> pending-out-of-date
     
  • frlan
    frlan
    2013-11-24

    • status: pending-out-of-date --> closed-out-of-date
    • Found in: --> Unknown
    • Fixed in: --> None