Seems to not be an issue on Linux.
References: https://github.com/geany/geany/issues/2639#issuecomment-723489800 https://github.com/geany/geany/issues/2639#issuecomment-723494612 https://github.com/geany/geany-osx/issues/20 https://www.mail-archive.com/users@lists.geany.org/msg02989.html
Information from the OPs of those comments/mails about how slow (numbers, "seems" isn't a measure) and how to reproduce might be useful.
@frlan reported also slowiness on startup. His debug message log indicated the startup itself is as fast as expected but opening session files takes from 100ms to 300ms per file. IIRC he had similar times on Linux und MacOS.
Besides that, I agree with @elextr: this either needs some detailed measurements or a good hint what could have changed or since when.
Additionally, on Windows, Geany is always and probably since ever rather slow.
opening session files takes from 100ms to 300ms per file. IIRC he had similar times on Linux und MacOS.
Local files on a normal disk or what? What filetypes? One file, many files?
Maybe one reproducing the issue could bisect if it happened since 1.36? Not sure how easy bisecting is on Windows/Macos (probably depends on how easy it is to build), but that could possibly be a cheap-ish way of figuring this out.
I'm exclusively on Linux, and my startup times always have been fairly slow due to my huuuge sessions, so I probably wouldn't have noticed either way :)
Hello I can definitely say that I notice the slowness since 1.37
file openning is slower, new file is slower as well
running geany.exe -v it waits before message "Geany: unknown : None (UTF-8)" appears
``` GLib-GIO: _g_io_module_get_default: Found default implementation winhttp (GWinHttpVfs) for â?~gio-vfsâ?T Geany: Loaded: C:\Program Files (x86)\Geany\lib\geany\saveactions.dll (Actions d'enregistrement) Geany: unknown : None (UTF-8) ```
in 1.36 the same output is present, but the load time is much faster
I also notice that in 1.37 it is only possible to create one new document, whereas in 1.36 it will create 1 new document each time I click on "new" (which is better and expected I think)
Sorry if it's a silly question, it just hit me: which GTK version are we using on OSX and Windows for 1.37 and before? As the default switched to 3.x, do we use that? If 1.37 is the first GTK3 release there, it might very well be that…
Hi,
looking at ReadMe.Dependencies.Geany.txt
from 1.36: file:///var/cache/pacman/pkg/mingw-w64-i686-gtk2-2.24.32-4-any.pkg.tar.xz
from 1.37: file:///var/cache/pacman/pkg/mingw-w64-i686-gtk2-2.24.32-6-any.pkg.tar.zst
looking at this file might be the way indeed...
how to tell which of the lib change could be causing the problem ?
whereas in 1.36 it will create 1 new document each time I click on "new" (which is better and expected I think)
Try without saveaction plugin.
Try without saveaction plugin.
same behavior without the plugin the log shows the message about new file beeing created but nothing appears
![image](https://user-images.githubusercontent.com/2546966/98820487-839afc00-242e-11e...)
the timestamps also illustrate the 2sec lag
in fact I have found the same issue exists in 1.36. It only occurs when there is no file openned. So if I have a file openned in geany, then clicking on new will work as expected. If I open geany empty, it will start by default with a new file, and in this case, clicking on new will not work as expected
Sorry if it's a silly question, it just hit me: which GTK version are we using on OSX and Windows for 1.37 and before? As the default switched to 3.x, do we use that? If 1.37 is the first GTK3 release there, it might very well be that…
1.37 for Windows was still GTK2 and since it seems already to happen with 1.36, it might have a lot more causes :(.
since it seems already to happen with 1.36, it might have a lot more causes :(.
Does it? IIUC what "issue exists in 1.36" is totally unrelated and about whether or not one can create more than one "untitled" files at once. @fyah @elextr BTW, please don't hijack this issue for unrelated things, open a dedicated one :wink:
since it seems already to happen with 1.36, it might have a lot more causes :(.
Does it? IIUC what "issue exists in 1.36" is totally unrelated and about whether or not one can create more than one "untitled" files at once.
Yeah, seems I mixed them up. Sorry.
please don't hijack this issue for unrelated things, open a dedicated one
yep sure, sorry for that, I first thougth that this was a 1.37 only problem and that could be related...
i created #2656 to reference this behavior
One thing that changed in 1.37 is saving the config every time a document is opened (or closed). Is that behaviour active whilst opening a session? (Just an idea)
@ntrel Wasn't able to verify this from ls: `-rw-r--r-- 1 frlan frlan 13088 2020-11-13 20:53:24.582760636 +0100 geany.conf`
from startup log: ``` Geany-INFO: 20:53:41.034: Geany 1.38 (git >= 40fcc798), de_DE.UTF-8 Geany-INFO: 20:53:41.035: GTK 3.24.23, GLib 2.66.2 Geany-INFO: 20:53:41.035: OS: Debian GNU/Linux bullseye/sid Geany-INFO: 20:53:41.035: System data dir: /usr/local/share/geany […] Geany-INFO: 20:53:47.778: /home/frlan/quellen/geany/po/pt_BR.po : Po (UTF-8) Geany-INFO: 20:53:47.885: /home/frlan/quellen/geany/po/ro.po : Po (UTF-8) Geany-INFO: 20:53:47.999: /home/frlan/quellen/geany/po/ru.po : Po (UTF-8) Geany-INFO: 20:53:48.144: /home/frlan/quellen/geany/po/sk.po : Po (UTF-8) Geany-INFO: 20:53:48.271: /home/frlan/quellen/geany/po/sl.po : Po (UTF-8) Geany-INFO: 20:53:48.382: /home/frlan/quellen/geany/po/sr.po : Po (UTF-8) Geany-INFO: 20:53:48.499: /home/frlan/quellen/geany/po/stamp-it : None (UTF-8) Geany-INFO: 20:53:48.620: /home/frlan/quellen/geany/po/sv.po : Po (UTF-8) Geany-INFO: 20:53:48.730: /home/frlan/quellen/geany/po/tr.po : Po (UTF-8) Geany-INFO: 20:53:48.837: /home/frlan/quellen/geany/po/uk.po : Po (UTF-8) Geany-INFO: 20:53:48.944: /home/frlan/quellen/geany/po/vi.po : Po (UTF-8) Geany-INFO: 20:53:49.056: /home/frlan/quellen/geany/po/zh_CN.po : Po (UTF-8) Geany-INFO: 20:53:49.182: /home/frlan/quellen/geany/po/zh_TW.po : Po (U ```
Maybe try simply deactivating the feature (`files.save_config_on_file_change` various pref) and see if it helps? That sounds slightly more trustworthy than mtimes, depending on the setup. Anyway, in theory the code guards against loading the session, but there possibly could be something fishy preventing it to work in some situations I guess.
Maybe try simply deactivating the feature (files.save_config_on_file_change various pref) and see if it helps?
I did the test and did not notice any improvement in startup speed when disabling the option
I'm having this issue on GNU/Debian Linux 10. I've been experiencing a slow-down when opening projects ever since I rebuilt Geany a couple weeks ago. I was using the git version. I checked out 1.37.1 and rebuilt, then 1.37.0, and things didn't go back to normal until I checked out 1.36 and rebuilt.
It happens with any project, no matter the number of files. Each file takes noticeably longer to load than before. I've included some logs and profiling output below.
``` 21:24:28: Geany INFO : Geany 1.37.1 (git >= 26f4813f), en_US.utf8 21:24:28: Geany INFO : GTK 3.24.5, GLib 2.58.3 21:24:28: Geany INFO : OS: Linux 21:24:28: Geany INFO : System data dir: /home/andy/.local/share/geany 21:24:28: Geany INFO : User config dir: /home/andy/.config/geany 21:24:28: Geany INFO : Loaded GTK+ CSS theme '/home/andy/.local/share/geany/geany.css' 21:24:28: Geany INFO : Loaded GTK+ CSS theme '/home/andy/.local/share/geany/geany-3.20.css' 21:24:28: Geany INFO : System plugin path: /home/andy/.local/lib/geany 21:24:28: Geany INFO : Added filetype Clojure (63). 21:24:28: Geany INFO : Added filetype Nim (64). 21:24:28: Geany INFO : Added filetype Graphviz (65). 21:24:28: Geany INFO : Added filetype Groovy (66). 21:24:28: Geany INFO : Added filetype CUDA (67). 21:24:28: Geany INFO : Added filetype JSON (68). 21:24:28: Geany INFO : Added filetype Arduino (69). 21:24:28: Geany INFO : Added filetype Kotlin (70). 21:24:28: Geany INFO : Added filetype Scala (71). 21:24:28: Geany INFO : Added filetype Genie (72). 21:24:28: Geany INFO : Added filetype Swift (73). 21:24:28: Geany INFO : Added filetype Cython (74). 21:24:28: Geany INFO : Added filetype TypeScript (75). 21:24:28: Geany INFO : Loaded libvte from libvte-2.91.so 21:24:28: Geany INFO : unknown : None (UTF-8) ``` ## config.log [config.log](https://github.com/geany/geany/files/5792156/config.log)
## SVG output from profiling This contains 2 SVG files, one from profiling with 1.36 and the other from 1.37.1
[geany_iss_2649_pprof.zip](https://github.com/geany/geany/files/5792171/geany_iss_2649_pprof.zip)
## Project I loaded for each of the 2 profiles
This is only useful to get an overview of the filetypes I'm loading. As I said above, it happens with any project. Most of the files I'm opening are of pretty average size.
[rmw.geany.txt](https://github.com/geany/geany/files/5792165/rmw.geany.txt)
These are the files included in the zip file above (converted to png).
![geany_1 36_pprof26182 0](https://user-images.githubusercontent.com/16764864/104113922-2f908480-52c4-1...) ![geany_1 37 1_pprof24873 0](https://user-images.githubusercontent.com/16764864/104113924-30291b00-52c4-1...)
``` *-disk:0 description: ATA Disk product: ST1000DX002-2DV1 physical id: 0 bus info: scsi@0:0.0.0 logical name: /dev/sda version: CC41 serial: Z4YG898K size: 931GiB (1TB) ```
``` andy@oceanus:~/src/Geany/geany/_build$ sudo hdparm -t /dev/sda
/dev/sda: Timing buffered disk reads: 626 MB in 3.01 seconds = 208.02 MB/sec ```
``` andy@oceanus:~/src/Geany/geany/_build$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 94 model name : Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz stepping : 3 microcode : 0xd6 cpu MHz : 900.033 cache size : 6144 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 22 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit srbds bogomips : 5424.00 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management: ```
The difference for loading 161 files is 13 seconds vs 5.
The 13 secs is 81mS per file average, not tragic, but certainly slower than before.
Most likely I'd say is a change in Scintilla that does more work each load.
At one stage Geany used to move the carat from the start of the newly opened file to the end, likely causing Scintilla to lay out the whole file, does anyone know if thats still happening?
Having the same issue on Windows 10. Did some testing with different Geany versions, different install and file locations and two different machines:
### Geany versions - 1.37.1 --> slow - 1.37 --> slow - 1.36 --> slow - 1.36 **portable** --> fast - 1.35 --> fast
``` 22:28:45: Geany INFO : Geany 1.37.1, German_Germany.1252 22:28:45: Geany INFO : GTK 2.24.32, GLib 2.66.2 22:28:45: Geany INFO : OS: Windows 10 1909 22:28:45: Geany INFO : System data dir: C:\Program Files (x86)\Geany\data 22:28:45: Geany INFO : User config dir: C:\Users\lupus\AppData\Roaming\geany 22:28:45: Geany INFO : System plugin path: C:\Program Files (x86)\Geany\lib\geany 22:28:45: Geany INFO : Added filetype Arduino (63). 22:28:45: Geany INFO : Added filetype Clojure (64). 22:28:45: Geany INFO : Added filetype CUDA (65). 22:28:45: Geany INFO : Added filetype Cython (66). 22:28:45: Geany INFO : Added filetype Genie (67). 22:28:45: Geany INFO : Added filetype Graphviz (68). 22:28:45: Geany INFO : Added filetype Groovy (69). 22:28:45: Geany INFO : Added filetype JSON (70). 22:28:45: Geany INFO : Added filetype Kotlin (71). 22:28:45: Geany INFO : Added filetype Nim (72). 22:28:45: Geany INFO : Added filetype Scala (73). 22:28:45: Geany INFO : Added filetype Swift (74). 22:28:45: Geany INFO : Added filetype TypeScript (75). 22:28:45: Geany INFO : Added filetype AutoHotkey (76). 22:28:45: GLib-GIO DEBUG : _g_io_module_get_default: Found default implementation winhttp (GWinHttpVfs) for ‘gio-vfs’ 22:28:46: Geany INFO : unknown : None (UTF-8) ```
``` 22:28:40: Geany INFO : Geany 1.35, German_Germany.1252 22:28:40: Geany INFO : GTK 2.24.32, GLib 2.60.1 22:28:40: Geany INFO : System data dir: C:\Program Files (x86)\Geany_135\data 22:28:40: Geany INFO : User config dir: C:\Users\lupus\AppData\Roaming\geany 22:28:40: Geany INFO : System plugin path: C:\Program Files (x86)\Geany_135\lib\geany 22:28:40: Geany INFO : Added filetype Arduino (61). 22:28:40: Geany INFO : Added filetype Clojure (62). 22:28:40: Geany INFO : Added filetype CUDA (63). 22:28:40: Geany INFO : Added filetype Cython (64). 22:28:40: Geany INFO : Added filetype Genie (65). 22:28:40: Geany INFO : Added filetype Graphviz (66). 22:28:40: Geany INFO : Added filetype JSON (67). 22:28:40: Geany INFO : Added filetype Scala (68). 22:28:40: Geany INFO : Added filetype AutoHotkey (69). 22:28:40: GLib-GIO DEBUG : _g_io_module_get_default: Found default implementation winhttp (GWinHttpVfs) for ‘gio-vfs’ 22:28:40: Geany INFO : unknown : None (UTF-8) ```
``` 11:32:03: Geany INFO : Using alternate configuration directory <----- PORTABLE 11:32:03: Geany INFO : Geany 1.36, German_Germany.1252 11:32:03: Geany INFO : GTK 2.24.32, GLib 2.60.6 11:32:03: Geany INFO : System data dir: F:\PortableApps\GeanyPortable\App\Geany\data 11:32:03: Geany INFO : User config dir: F:\PortableApps\GeanyPortable\Data\settings 11:32:04: Geany INFO : System plugin path: F:\PortableApps\GeanyPortable\App\Geany\lib\geany 11:32:04: Geany INFO : Added filetype Arduino (61). 11:32:04: Geany INFO : Added filetype Clojure (62). 11:32:04: Geany INFO : Added filetype CUDA (63). 11:32:04: Geany INFO : Added filetype Cython (64). 11:32:04: Geany INFO : Added filetype Genie (65). 11:32:04: Geany INFO : Added filetype Graphviz (66). 11:32:04: Geany INFO : Added filetype Groovy (67). 11:32:04: Geany INFO : Added filetype JSON (68). 11:32:04: Geany INFO : Added filetype Kotlin (69). 11:32:04: Geany INFO : Added filetype Nim (70). 11:32:04: Geany INFO : Added filetype Scala (71). 11:32:04: Geany INFO : Added filetype Swift (72). 11:32:04: Geany INFO : Added filetype TypeScript (73). 11:32:04: Geany INFO : Added filetype AutoHotkey (74). 11:32:04: GLib-GIO DEBUG : _g_io_module_get_default: Found default implementation winhttp (GWinHttpVfs) for ‘gio-vfs’ 11:32:04: Geany INFO : unknown : None (UTF-8) ```
Notice the different GLib versions. GTK is identical.
### Slow vs. fast With "slow" I mean the longer load times for opening (new) files, which I first realized after upgrading from 1.35 to 1.37. With "fast" I mean the normal load times from 1.35.
As already mentioned, the problem is not the startup time of Geany itself, but the time to open a file. This applies to opening a text file from an arbitrary location on disk, but also **opening a new and empty file** via `ctrl+n`.
In my opinion, there is nothing special about opening sessions/projects, except the fact that sessions usually include multiple files, which means one slowdown per file in the saved session.
### Plugins and settings Tried with plugins and with deactivating all plugins via settings -> general menu. No difference. Tried with and without `files.save_config_on_file_change`. No difference.
### Location and machine Staying on the same machine (tested at work), it makes no difference if I run Geany (or load files) from the local SSD, HDD, USB flash drive or network share. At least the Geany/file location impact is much smaller than the difference between the slow and fast Geany versions. On the machine at home I did not test with different install locations, but expect the same result.
My machine at home shows faster startup/load times in general. The slow/fast version difference is still noticeable, albeit less pronounced.
### Portable version This really puzzles me. It was the last test I did. Before, I was sure hat something must have changed between 1.35 and 1.36 (untouched by changes introduced in 1.37 and 1.37.1). But than I discovered that [PortableApp's 1.36 version](https://portableapps.com/apps/development/geany_portable) has the fast load times from 1.35 and not the slow ones from 1.36 non-portable!
Unfortunately, it seems like they don't offer 1.37 or 1.37.1 yet and 1.34 not anymore. 1.33 is still available, but I did not test it, because I expect fast times as with 1.35.
So far, I only tested 1.36 portable at work, but will test at home later.
The big question is: Why do 1.36 portable and non-portable behave differently? With the portable version, one does not start Geany directly, but with a launcher executable `GeanyPortable.exe`. The launcher does some "portable magic" beforehand, than loads `geany.exe`, and does some cleanup afterwards (as far as I understand the portable apps system).
Anything else I can do to narrow down the problem?
@L--U--P--U--S Thanks for the extra info. Can you time some of the differences with a stopwatch?
Sorry, my mistake. 1.36 is fast, both in the portable and the non-portable version. Don't know what happened that night …
I updated the previous post. Now my observations are consistent with @andy5995 : All versions are fast versions until and including 1.36. Slowdown starts with 1.37 and goes on with 1.37.1.
Will do some stopwatch experiments tomorrow.
@L--U--P--U--S Thanks for the work, could you please do comparisons using versions built with gtk3. As 1.37 is the last release that will officially support gtk2, any issues it causes are likely not going to be fixed.
@andy5995 your 1.37 debug messages shows its gtk3, can you post your 1.36 debug just to reassure me its also gtk3.
I can't measure any material difference (the difference is within the error caused by my reaction time) between
``` 08:56:28: Geany INFO : Geany 1.37 (git >= 915cf6e8), en_AU.UTF-8 08:56:28: Geany INFO : GTK 3.24.20, GLib 2.64.3 08:56:28: Geany INFO : OS: Linux Mint 20 (ulyana) ``` and
``` 08:55:54: Geany INFO : Geany 1.36 (git >= 825acb21), en_AU.UTF-8 08:55:54: Geany INFO : GTK 3.24.20, GLib 2.64.3 ```
opening a project with Geanys and Scintilla sources.
Always be careful what you are comparing is identical, use a copy of the same files, but don't use the same actual files between the two geanys or OS caching may make the second run faster.
Always measure more than once to avoid any system hiesenwork happening in the background affecting the results (your mailer fetching stuff, your browser updating the news feed etc).
``` 18:28:27: Geany INFO : Geany 1.36, en_US.utf8 18:28:27: Geany INFO : GTK 3.24.5, GLib 2.58.3 18:28:27: Geany INFO : System data dir: /home/andy/.local/share/geany 18:28:27: Geany INFO : User config dir: /home/andy/.config/geany 18:28:28: Geany INFO : Loaded GTK+ CSS theme '/home/andy/.local/share/geany/geany.css' 18:28:28: Geany INFO : Loaded GTK+ CSS theme '/home/andy/.local/share/geany/geany-3.20.css' 18:28:28: Geany INFO : System plugin path: /home/andy/.local/lib/geany 18:28:28: Geany INFO : Added filetype Clojure (61). 18:28:28: Geany INFO : Added filetype Nim (62). 18:28:28: Geany INFO : Added filetype Graphviz (63). 18:28:28: Geany INFO : Added filetype Groovy (64). 18:28:28: Geany INFO : Added filetype CUDA (65). 18:28:28: Geany INFO : Added filetype JSON (66). 18:28:28: Geany INFO : Added filetype Arduino (67). 18:28:28: Geany INFO : Added filetype Kotlin (68). 18:28:28: Geany INFO : Added filetype Scala (69). 18:28:28: Geany INFO : Added filetype Genie (70). 18:28:28: Geany INFO : Added filetype Swift (71). 18:28:28: Geany INFO : Added filetype Cython (72). 18:28:28: Geany INFO : Added filetype TypeScript (73). 18:28:28: Geany INFO : Loaded libvte from libvte-2.91.so 18:28:28: Geany INFO : unknown : None (UTF-8) ```
I've narrowed down the specific commit where this slowdown starts.
https://github.com/geany/geany/commit/e42a963d6b4f1b2ef2063e59fc4139a250dfe7...
Which is one commit before the release of 1.37.0
As discussed on IRC https://github.com/geany/geany/commit/e42a963d6b4f1b2ef2063e59fc4139a250dfe7... may cause Scintilla to re-layout stuff, but maybe Pango caching is improving it, @andy5995 is on Pango 1.42.4 and I'm on Pango 1.44.7
Just to note the profiles @andy5995 posted above show most time being spent in Pango.
I was curious and built pango from git, installed it, rebuilt geany.. appears to be linked properly, but I still get the slowdown
``` $ ldd `which geany` linux-vdso.so.1 (0x00007fff31b61000) libgeany.so.0 => /home/andy/.local/lib/libgeany.so.0 (0x00007fcae186a000) libgtk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007fcae1179000) libgdk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-3.so.0 (0x00007fcae107d000) libpangocairo-1.0.so.0 => /home/andy/.local/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007fcae106c000) libpango-1.0.so.0 => /home/andy/.local/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007fcae101d000) ```
could you please do comparisons using versions built with gtk3. As 1.37 is the last release that will officially support gtk2, any issues it causes are likely not going to be fixed.
Are there windows installers with gtk3 available for download or do I have do compile it myself following [this guide](https://wiki.geany.org/howtos/win32/msys2)?
Can you time some of the differences with a stopwatch?
### Procedure 1. randomly opened 15 files (ranging from one to some hundreds of lines in size) and save those files as project 2. closed Geany 3. opened Geany (empty editor/file) 4. opened project while looking on stopwatch
Repeated steps 2-4 several times while switching between 1.36 and 1.37(.1) once in a while. Always got identical timings (in terms of 1-sec-accuracy).
### Result - at home (better I/O performance in general) - 1.37.1 --> about 11 sec in total - 1.36 --> something between 1 and 2 sec - at work - 1.37 --> about 15 sec - 1.36 --> something between 1 and 2 sec
### Note As stated, I always started with an fresh/empty Geany instance. While waiting for all the project files to open, the Geany window kind of freezes.
Why "kind of"? The editor stays empty until all files have been opened. I cannot see the mouse pointer if it is located on top of the Geany window (can see it if moving the pointer sideways on top of another window or desktop), **but** the window title gets updated with the file, which is currently loaded or was loaded last.
@L--U--P--U--S ummm, ahh, Windows, I missed that, yeah well the windows downloads are gtk2 up to 1.37, the intention is to switch to gtk3 before 1.38 release, but it depends on peoples time availability which is unknown in these "interesting" times. So you would have to build it yourself at the moment.
hmmm, 15 files of a few hundred lines taking 11 secs, on Linux I'm testing with approx 120 files taking about 6 secs, some of them being several thousands of lines (basically Geany and Scintilla src directories) and not seeing any difference between 1.36 and 1.37, but @andy5995 is seeing it on Linux. I'm not on a blindingly fast machine, its 9 years old, but it is from SSD, I wonder if there is something about some disks? And windows? I'm not aware of any big changes to how Geany reads files between 1.36 and 1.37. If I get time I will try loading the files off spinny disk.
So you would have to build it yourself at the moment.
Built a gtk3 version myself using https://download.geany.org/geany-1.37.1.tar.gz, https://wiki.geany.org/howtos/win32/msys2 (with few adjustments to fix configure errors) and my home machine.
Outcome: **absolutely no difference** :( Identical behaviour and time … as described [before](#issuecomment-759335428).
``` 21:00:33: Geany INFO : Using TCP port number 45937 for IPC 21:00:33: Geany INFO : Geany 1.37.1, German_Germany.1252 21:00:33: Geany INFO : GTK 3.24.24, GLib 2.66.4 21:00:33: Geany INFO : OS: Windows 10 1909 21:00:33: Geany INFO : System data dir: C:\geany\data 21:00:33: Geany INFO : User config dir: C:\Users\lupus\AppData\Roaming\geany 21:00:33: GLib-GIO DEBUG : _g_io_module_get_default: Found default implementation winhttp (GWinHttpVfs) for ‘gio-vfs’ 21:00:33: Geany INFO : Loaded GTK+ CSS theme 'C:\geany\data\geany.css' 21:00:33: Geany INFO : Loaded GTK+ CSS theme 'C:\geany\data\geany-3.20.css' 21:00:33: Geany INFO : System plugin path: C:\geany\lib\geany 21:00:33: Geany INFO : Added filetype Arduino (63). 21:00:33: Geany INFO : Added filetype Clojure (64). 21:00:33: Geany INFO : Added filetype CUDA (65). 21:00:33: Geany INFO : Added filetype Cython (66). 21:00:33: Geany INFO : Added filetype Genie (67). 21:00:33: Geany INFO : Added filetype Graphviz (68). 21:00:33: Geany INFO : Added filetype Groovy (69). 21:00:33: Geany INFO : Added filetype JSON (70). 21:00:33: Geany INFO : Added filetype Kotlin (71). 21:00:33: Geany INFO : Added filetype Nim (72). 21:00:33: Geany INFO : Added filetype Scala (73). 21:00:33: Geany INFO : Added filetype Swift (74). 21:00:33: Geany INFO : Added filetype TypeScript (75). 21:00:33: Geany INFO : Added filetype AutoHotkey (76). 21:00:34: Geany INFO : unknown : None (UTF-8) ```
@L--U--P--U--S thanks for doing that, so at least your problem doesn't seem to be GTK major version dependent either.
So summarising the data:
| Reported | OS | Version | GTK | slower | |-------------|------|------------|--------|----------| | https://github.com/geany/geany-osx/issues/20 | OSX | 1.36 | ??? | no | | https://github.com/geany/geany-osx/issues/20 | OSX | 1.37-2 | ??? | yes untimed | | @L--U--P--U--S | Windows | 1.36 | GTK 2.24.32, GLib 2.60.6 | no | | @L--U--P--U--S | Windows | 1.37.1 | GTK 2.24.32, GLib 2.66.2 | yes 5-10 times | | #2639 | Windows | 1.36 | ??? | no | | #2639 | Windows | 1.37.1 | ??? | yes untimed | | @andy5995 | Linux | 1.36 | GTK 3.24.5, GLib 2.58.3 | no | | @andy5995 | Linux | 1.37 | GTK 3.24.5, GLib 2.58.3 | yes, 2 times | | @elextr | Linux | 1.36 | GTK 3.24.20, GLib 2.64.3 | No | | @elextr | Linux | 1.37 | GTK 3.24.20, GLib 2.64.3 | No |
And to summarise my conclusions from that:
1. For some people 1.37(.1) is measurably slower, but not everyone, seems from the reports at https://github.com/geany/geany-osx/issues/20 (OSX) @L--U--P--U--S (Windows) and @andy5995 (Linux) it happens on all platforms. 2. @andy5995 bisected it to https://github.com/geany/geany/commit/e42a963d6b4f1b2ef2063e59fc4139a250dfe7... on Linux 3. but neither @codebrainz nor I see any slowdown on Linux
So maybe there is something in the environment that triggers https://github.com/geany/geany/commit/e42a963d6b4f1b2ef2063e59fc4139a250dfe7... to cause slowdown.
Because that patch sets the margin width, maybe it triggers Scintilla to re-layout each file after opening which is a plausible slowdown, but why does it only happen on some systems, or is that patch a furphy, those are the questions?
Because it is mentioned in the very first post, I suggest to add Georg Klingenberg's report to the table:
Reported | OS | Version | GTK | slower -- | -- | -- | -- | -- [msg02989](https://www.mail-archive.com/users@lists.geany.org/msg02989.html) | Windows| 1.36 | ??? | no [msg02989](https://www.mail-archive.com/users@lists.geany.org/msg02989.html) | Windows| 1.37 | ??? | yes untimed
In his [reply](https://www.mail-archive.com/users@lists.geany.org/msg02992.html) he described the familiar behaviour: not the startup per se is slow, but the load time of each file (loaded at startup or later).
OK, thanks to the @andy5995's bisect we now know what's going on, and I see at least on one of my machines that undoing most of what that commit does roughly halves my loading times as well (I guess I never really noticed because I'm used for my usual huge Geany session to be slow enough that I don't attend it, and I don't restart Geany often either).
In any case, if all the reports about this slowness come from the same issue, then we're on the right tracks: having identified the issue usually accounts for at least half the work. Thanks!
Ok, I can get the slowdown if I make a project with _line wrap on all files_.
That definitely suggests that its a display issue triggered by the margin width thing. Possibly hard to fix if keeping the auto margin width, since the file needs to be loaded, which does one layout pass, to get line height, to calculate the margin setting, which triggers another layout pass.
Maybe add #2140 back in for you folks who load the whole world in one go with wrap on :grin:
@b4n since all Scintilla widgets have the same font and so line height and so margin width, can that be calculated with the first file loaded and set on the widget before loading for the other files so they only layout once?
Ok, I can get the slowdown if I make a project with _line wrap on all files_.
For me, it made no difference. I have line wrapping disabled (0;1;0).
Because display and margin stuff was mentioned, I did more testing with the view options … with an interesting outcome, I think:
Usually, I have line endings turned off, everything else on. - [x] Show markers margin - [x] Show Line Numbers - [x] Show spaces - [ ] Show line endings - [x] Show indentation guides --> 15s ----- - [ ] Show markers margin - [x] Show Line Numbers - [x] Show spaces - [ ] Show line endings - [x] Show indentation guides --> 10s ----- - [ ] Show markers margin - [ ] Show Line Numbers - [x] Show spaces - [ ] Show line endings - [x] Show indentation guides --> 8s ----- - [ ] Show markers margin - [ ] Show Line Numbers - [ ] Show spaces - [ ] Show line endings - [x] Show indentation guides --> 8s ----- - [ ] Show markers margin - [ ] Show Line Numbers - [ ] Show spaces - [ ] Show line endings - [ ] Show indentation guides --> 8s ----- Ok, everything off. Let's reverse some. - [x] Show markers margin - [ ] Show Line Numbers - [ ] Show spaces - [ ] Show line endings - [ ] Show indentation guides --> 12s ----- - [x] Show markers margin - [ ] Show Line Numbers - [ ] Show spaces - [x] Show line endings - [ ] Show indentation guides --> 12s ----- - [x] Show markers margin - [x] Show Line Numbers - [ ] Show spaces - [x] Show line endings - [ ] Show indentation guides --> 15s
All using version 1.37.0. 15 files loaded at once via project. Stopwatch precision.
With 1.36: back to 2s, as described [before](#issuecomment-759335428), with all options turned on.
It looks like _markers margin_ (~4-5s) and _Line Numbers_ (2-3s) have an impact on the load times. The other view options don't have an impact; or at least not a measurable one with my test project size and stopwatch.
Does this tell you something?
@L--U--P--U--S it pretty much points to the same thing, the slowdowns happen when you turn on auto margin things.
Line number margins are set by Geany to fit the line numbers in a Scintilla callback IIRC, so its after Scintilla has loaded and done its thing, which may have included laying out at least some of the file, so that layout has to be done again after the margin is set since that changes the available page width, and that re-layout is the extra time you see. Not sure how we can fix that since it is different for each file because it depends on the number of lines in each file and so can't be set until the file is loaded.
The marker margins is the one automated by the patch identified by @andy5995 and it probably also causes a Scintilla re-layout when its set to anything other than Scintillas default value (16 I think). Hopefully @b4n can identify a way of setting it before load since its the same for all files.
Hi, any progress on this issue? Same behavior in Ubuntu 20.04, just compiled Geany 1.37.1 and it is way slower than 1.36. This is an up-to-date system, 16GB RAM, SSD, 4th gen i3 processor.
@gsi-nestor its only been just over a week since last post, be patient or provide a PR.
I'll be patient, thanks.
El mar., 26 ene. 2021 10:49 p.m., elextr notifications@github.com escribió:
@gsi-nestor https://github.com/gsi-nestor its only been just over a week since last post, be patient or provide a PR.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geany/geany/issues/2649#issuecomment-768002782, or unsubscribe https://github.com/notifications/unsubscribe-auth/APXW3UAOB2Q56GQE77CKKA3S36EK5ANCNFSM4TOTNBYA .
Hi @gsi-nestor, and welcome to the Geany project. Thank you for reporting your OS and specs.
OK, took me long enough to work on that one, but please give the branch [`startup-speed`](/geany/geany/tree/startup-speed) a spin.
My results, which are the mean average time (measuring `document_open_file_full()`) for opening Geany's `src/*.[ch]` (96 C files), best out of 3 runs:
1.36 (A) | 1.37 fixed-width (B) | ±1.37.1 (C) | `startup-speed` branch (D) ----- | ------- | ------- | --- 0.048028s | 0.068192s | 0.146446s | 0.048415s 825acb21eabd33390616b224b0454886dc7d6ec2 | d9f8cdbad58d09f0c18ca8acccb49209263018f0 patched to use fixed 16px-wide margins | d9f8cdbad58d09f0c18ca8acccb49209263018f0 | b08ae0fe65c0942dca20281d6841dc83406d8b5e
mean difference (`round(Y * 100 / X)`): | A | B | C | D -- | ----- | ----- | ----- | ----- **A** | 100% | 70% | 33% | 99% **B** | 142% | 100% | 47% | 141% **C** | 305% | 215% | 100% | 302% **D** | 101% | 71% | 33% | 100%
As you can see, my branch is ever so slightly slower than 1.36 -- if the precision here means anything. I'm not sure why 1.37 with fixed-width margins is so much slower than 1.36, maybe a change in Scintilla? Not sure.
Anyway, the conclusion can be that 1.37 is real slow, about 3 times slower than 1.36 in my example. My proposed fix is back to 1.36-level speeds, and keeps the dynamic margin sizes, so I think it's a win-win, although there's indeed a little more code complexity.
Hmmm, so even if we ask for the height of line 1 Scintilla lays out the whole file, well, I suppose it is necessary since Scintilla styles can have differing font sizes.
See my comments on the branch regarding the [ahem] "code complexity" :) but the basic idea looks good.
please give the branch [`startup-speed`](/geany/geany/tree/startup-speed) a spin
Works for me (Win10).
Also for me on Debian 10
``` 16:00:31: Geany INFO : Geany 1.38 (git >= f600937d), en_US.utf8 16:00:31: Geany INFO : GTK 3.24.5, GLib 2.58.3 16:00:31: Geany INFO : OS: Linux 16:00:31: Geany INFO : System data dir: /home/andy/.local/share/geany 16:00:31: Geany INFO : User config dir: /home/andy/.config/geany 16:00:31: Geany INFO : Loaded GTK+ CSS theme '/home/andy/.local/share/geany/geany.css' 16:00:31: Geany INFO : Loaded GTK+ CSS theme '/home/andy/.local/share/geany/geany-3.20.css' 16:00:31: Geany INFO : System plugin path: /home/andy/.local/lib/geany 16:00:31: Geany INFO : Added filetype Clojure (63). 16:00:31: Geany INFO : Added filetype Nim (64). 16:00:31: Geany INFO : Added filetype Graphviz (65). 16:00:31: Geany INFO : Added filetype Groovy (66). 16:00:31: Geany INFO : Added filetype CUDA (67). 16:00:31: Geany INFO : Added filetype JSON (68). 16:00:31: Geany INFO : Added filetype Arduino (69). 16:00:31: Geany INFO : Added filetype Kotlin (70). 16:00:31: Geany INFO : Added filetype Scala (71). 16:00:31: Geany INFO : Added filetype Genie (72). 16:00:31: Geany INFO : Added filetype Swift (73). 16:00:31: Geany INFO : Added filetype Cython (74). 16:00:31: Geany INFO : Added filetype TypeScript (75). 16:00:32: Geany INFO : Loaded libvte from libvte-2.91.so.0 16:00:32: Geany INFO : unknown : None (UTF-8) ```
@L--U--P--U--S @andy5995 Thanks for testing!
Closed #2649 via b08ae0fe65c0942dca20281d6841dc83406d8b5e.
github-comments@lists.geany.org