RightHeX0R wrote: Wed Oct 23, 2024 7:43 pmI don't think you got what I was saying.dangerfreak wrote: Wed Oct 23, 2024 7:33 pmThe length of the source code slows down the editor continously - the content doesn't make a difference. As I wrote before, the editor/purebasic also is extremely slow with a blank editor when opening the menu "File -> Preferences".HeX0R wrote: Wed Oct 23, 2024 7:25 pm You could use the IDE source, compile it with debugger on, add some debug outputs here and there, and you should find the part which slows things down.
Remember: On one of my computers purebasic and the editor is really fast, with the same preferences and source code!
[SOLVED] Very slow editor - independent of settings
-
- User
- Posts: 80
- Joined: Tue Jan 12, 2010 4:56 pm
Re: Very slow editor - independent of settings
Re: Very slow editor - independent of settings
Does this only happen in the editor. Can you open files at normal times in other editors?
▓▓▓▓▓▒▒▒▒▒░░░░░
-
- User
- Posts: 80
- Joined: Tue Jan 12, 2010 4:56 pm
Re: Very slow editor - independent of settings
Yes, for example notepad++ is very fast on all of my computers.
Re: Very slow editor - independent of settings
So it's a PC problem and nothing to do with PureBasic.dangerfreak wrote: Wed Oct 23, 2024 7:33 pmRemember: On one of my computers purebasic and the editor is really fast, with the same preferences and source code!
Re: Very slow editor - independent of settings
That's a big assumption, I can tell you first hand that an app behaving one way on one machine and completely differently on another is quite a common occurance. There could be any number of factors, from a misconfigured mouse on all the machies it happens on to a weird pointer error in the IDE that only happens on Tuesdays and when it's exactly 32.1 degrees C where Fred lives. You never know.BarryG wrote: Wed Oct 23, 2024 10:12 pmSo it's a PC problem and nothing to do with PureBasic.dangerfreak wrote: Wed Oct 23, 2024 7:33 pmRemember: On one of my computers purebasic and the editor is really fast, with the same preferences and source code!
Edited to add this: for example, on one of my machines, the menu bar of PureBasic read absolutely fine with my screen reader. On all the rest, it did not. "PC issue", I can already hear you saying. But it wasn't! It turned out to be the icons on menu bar items not playing nice with NVDA, on only certain machines. Never did figure out why.
-
- User
- Posts: 80
- Joined: Tue Jan 12, 2010 4:56 pm
Re: Very slow editor - independent of settings
Yes, you are right, it could still be a Purebasic problem. On the other hand, there might be a solution somewhere hidden in Windows. I think it's remarkable, that it takes "forever" just to open the preferences. First it takes a while, until the (empty) preferences window appears. Then it takes some seconds until the menu tree and the options appear. It probably sounds weird, but maybe it's some kind of graphics (or graphic card) problem?
Re: Very slow editor - independent of settings
Yes, what you are describing looks like a driver issue, but the other apps behaves correctly ? PB IDE is a native app using native controls, so there is no way it could take that much time just to render the preference window. Could you post a video with the task manager visible ?
Re: Very slow editor - independent of settings
To help understand, I've built a test version PureBasic.zip (my environment is ready)dangerfreak wrote: Wed Oct 23, 2024 6:15 pm I just noticed another interesting thing: I started Purebasic and didn't load a project, the editor is EMPTY. Then I clicked on the menu "File -> Preferences" - it takes 10 seconds until the preferences window appears! On my only fast working computer, this only takes one second.
By adding multiples ElapsedMilliseconds(), in OpenPreferencesWindow() procedure and at the end of the main markers, without looking further into the code.
And at the end of OpenPreferencesWindow(), copy the times to the clipboard + message.
It should help to see where it slows down.
Here on my laptop:
Code: Select all
EnsureWindowOnDesktop = 267
General = 32
Editor = 32
Compiler = 1
Debugger = 1
ToolsPanel = 2
Total OpenPreferencesWindow Time = 411
-
- User
- Posts: 80
- Joined: Tue Jan 12, 2010 4:56 pm
Re: Very slow editor - independent of settings
Yes, all other apps work correctly. Here is the video: https://www.dropbox.com/scl/fi/s6bd67mg ... m86of&dl=1Fred wrote: Thu Oct 24, 2024 8:03 am Yes, what you are describing looks like a driver issue, but the other apps behaves correctly ? PB IDE is a native app using native controls, so there is no way it could take that much time just to render the preference window. Could you post a video with the task manager visible ?
The same happens when loading a project - CPU usage is rising, RAM and HD is normal.
Re: Very slow editor - independent of settings
That's very slow for sure. Even my 15 years old i7 open the prefs in less than a second 

-
- User
- Posts: 80
- Joined: Tue Jan 12, 2010 4:56 pm
Re: Very slow editor - independent of settings
My result:ChrisR wrote: Thu Oct 24, 2024 8:57 amTo help understand, I've built a test version PureBasic.zip (my environment is ready)dangerfreak wrote: Wed Oct 23, 2024 6:15 pm I just noticed another interesting thing: I started Purebasic and didn't load a project, the editor is EMPTY. Then I clicked on the menu "File -> Preferences" - it takes 10 seconds until the preferences window appears! On my only fast working computer, this only takes one second.
By adding multiples ElapsedMilliseconds(), in OpenPreferencesWindow() procedure and at the end of the main markers, without looking further into the code.
And at the end of OpenPreferencesWindow(), copy the times to the clipboard + message.
It should help to see where it slows down.
Here on my laptop:Code: Select all
EnsureWindowOnDesktop = 267 General = 32 Editor = 32 Compiler = 1 Debugger = 1 ToolsPanel = 2 Total OpenPreferencesWindow Time = 411
EnsureWindowOnDesktop = 1050
General = 334
Editor = 180
Compiler = 9
Debugger = 3
ToolsPanel = 9
Total OpenPreferencesWindow Time = 1997
Re: Very slow editor - independent of settings
Just a shot in the dark, I compiled the IDE using the C backend: https://www.purebasic.com/beta/windows_ ... eBasic.exe
You can test it and see it makes any differences (might be several mem misalignment issues or something)
You can test it and see it makes any differences (might be several mem misalignment issues or something)
-
- User
- Posts: 80
- Joined: Tue Jan 12, 2010 4:56 pm
Re: Very slow editor - independent of settings
I bet it's the same problem loading a project. Loading a .pb file with 297kb takes 20 seconds for me. Editing the source code is a pain, because scrolling or even moving the cursor takes very long, sometimes it's freezing for some seconds.Fred wrote: Thu Oct 24, 2024 9:14 am That's very slow for sure. Even my 15 years old i7 open the prefs in less than a second![]()
-
- User
- Posts: 80
- Joined: Tue Jan 12, 2010 4:56 pm
Re: Very slow editor - independent of settings
Many thanks for your help, unfortunately it didn't work - opening the preferences still takes very long, I can see no differenceFred wrote: Thu Oct 24, 2024 9:21 am Just a shot in the dark, I compiled the IDE using the C backend: https://www.purebasic.com/beta/windows_ ... eBasic.exe
You can test it and see it makes any differences (might be several mem misalignment issues or something)

Re: Very slow editor - independent of settings
And for small files it works as expected ? The IDE has a file of 300 kb (preferences.pb) and it works very fast here.dangerfreak wrote: Thu Oct 24, 2024 9:23 amI bet it's the same problem loading a project. Loading a .pb file with 297kb takes 20 seconds for me. Editing the source code is a pain, because scrolling or even moving the cursor takes very long, sometimes it's freezing for some seconds.Fred wrote: Thu Oct 24, 2024 9:14 am That's very slow for sure. Even my 15 years old i7 open the prefs in less than a second![]()