[SOLVED] Very slow editor - independent of settings

Working on new editor enhancements?
dangerfreak
User
User
Posts: 80
Joined: Tue Jan 12, 2010 4:56 pm

Re: Very slow editor - independent of settings

Post by dangerfreak »

HeX0R wrote: Wed Oct 23, 2024 7:43 pm
dangerfreak wrote: Wed Oct 23, 2024 7:33 pm
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.
The 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".

Remember: On one of my computers purebasic and the editor is really fast, with the same preferences and source code!
I don't think you got what I was saying.
Right 😁 . Well ok, now I know what you mean (really!). But I don't have a clue how to do that.
Nituvious
Addict
Addict
Posts: 1027
Joined: Sat Jul 11, 2009 4:57 am
Location: United States

Re: Very slow editor - independent of settings

Post by Nituvious »

Does this only happen in the editor. Can you open files at normal times in other editors?
▓▓▓▓▓▒▒▒▒▒░░░░░
dangerfreak
User
User
Posts: 80
Joined: Tue Jan 12, 2010 4:56 pm

Re: Very slow editor - independent of settings

Post by dangerfreak »

Yes, for example notepad++ is very fast on all of my computers.
BarryG
Addict
Addict
Posts: 4128
Joined: Thu Apr 18, 2019 8:17 am

Re: Very slow editor - independent of settings

Post by BarryG »

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!
So it's a PC problem and nothing to do with PureBasic.
Quin
Addict
Addict
Posts: 1127
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: Very slow editor - independent of settings

Post by Quin »

BarryG wrote: Wed Oct 23, 2024 10:12 pm
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!
So it's a PC problem and nothing to do with PureBasic.
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.


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.
dangerfreak
User
User
Posts: 80
Joined: Tue Jan 12, 2010 4:56 pm

Re: Very slow editor - independent of settings

Post by dangerfreak »

Quin wrote: Wed Oct 23, 2024 11:26 pm That's a big assumption,[...]
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?
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Very slow editor - independent of settings

Post by Fred »

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 ?
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Very slow editor - independent of settings

Post by ChrisR »

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.
To help understand, I've built a test version PureBasic.zip (my environment is ready)
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
dangerfreak
User
User
Posts: 80
Joined: Tue Jan 12, 2010 4:56 pm

Re: Very slow editor - independent of settings

Post by dangerfreak »

Fred 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 ?
Yes, all other apps work correctly. Here is the video: https://www.dropbox.com/scl/fi/s6bd67mg ... m86of&dl=1

The same happens when loading a project - CPU usage is rising, RAM and HD is normal.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Very slow editor - independent of settings

Post by Fred »

That's very slow for sure. Even my 15 years old i7 open the prefs in less than a second :D
dangerfreak
User
User
Posts: 80
Joined: Tue Jan 12, 2010 4:56 pm

Re: Very slow editor - independent of settings

Post by dangerfreak »

ChrisR wrote: Thu Oct 24, 2024 8:57 am
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.
To help understand, I've built a test version PureBasic.zip (my environment is ready)
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
My result:

EnsureWindowOnDesktop = 1050
General = 334
Editor = 180
Compiler = 9
Debugger = 3
ToolsPanel = 9
Total OpenPreferencesWindow Time = 1997
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Very slow editor - independent of settings

Post by Fred »

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)
dangerfreak
User
User
Posts: 80
Joined: Tue Jan 12, 2010 4:56 pm

Re: Very slow editor - independent of settings

Post by dangerfreak »

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 :D
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.
dangerfreak
User
User
Posts: 80
Joined: Tue Jan 12, 2010 4:56 pm

Re: Very slow editor - independent of settings

Post by dangerfreak »

Fred 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)
Many thanks for your help, unfortunately it didn't work - opening the preferences still takes very long, I can see no difference :cry: .
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Very slow editor - independent of settings

Post by Fred »

dangerfreak wrote: Thu Oct 24, 2024 9:23 am
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 :D
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.
And for small files it works as expected ? The IDE has a file of 300 kb (preferences.pb) and it works very fast here.
Post Reply