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.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2649#issuecomment-773664375

Reply via email to