Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in startup speed between RC_5.20.218.2 and RC2_5.20.305.2 #2330

Closed
AlexVallat opened this issue May 14, 2020 · 8 comments
Closed

Comments

@AlexVallat
Copy link

It's not much, but as a large part of the attraction of Notepad3 is the near-instantaneous startup, I considered this worth reporting.

I have bisected to find the regression occurs between RC1 (e73e903) and RC2 (74e6afe)

It would be really great if you could do some profiling and discover what is causing the slowdown, and if it can't be fixed perhaps whatever new functionality that is causing it can be gated behind a pref?

@RaiKoHoff
Copy link
Collaborator

Please ensure, that the slow-down is not caused by Anti-Malware and/or Windows smartscreen, like for Electron (see: electron/electron#1487).

@AlexVallat
Copy link
Author

My test setup for this is to install the portable version of RC2, then in App/Notepad3/x64 rename Notepad3.exe to Notepad3-RC2.exe. Then, in the same folder, extract App/Notepad3/x64/Notepad3.exe from RC1 and rename it to Notepad3/RC1.exe.

Then create and run this batch script:

start "" Notepad3-RC2.exe /t RC2
start "" Notepad3-RC1.exe /t RC1

This runs both simultaneously. To be extra-fair, I even put RC2 first.

The RC2 window appears noticeably later than the RC1 window.

I do not believe this regression to be related to virus checking, but if it is, then there's something that was introduced with RC2 that causes virus checking problems that was not there in RC1.

@craigo-
Copy link

craigo- commented May 15, 2020

I too have noticed that in recent builds, launch time does appear to be slower than usual. It occurs whether my antivirus is off or on.

There was definitely a speed degradation after the ini file multiaccess work (which I figured was unavoidable - maybe it isn't?)

There is also a CPU usage spike on both program launch and exit that correlates to the number of items in Notepad3's file history. The more history, the longer and higher the CPU spike.

Testing Environment:

  • Notepad3 x64 5.20.506.2 BETA
  • Windows 10 Enterprise x64 1909
  • Antivirus off

Test A: No Items in File History:

Media1

On launch, CPU spikes to about 24% for about 4 seconds before settling down to a 12-13% idle. On exit, CPU spikes to about 19% for about 4 seconds before settling down to a 12-13% idle.

Test B: 32 Items in File History:

Media2

On launch, CPU spikes to about 94% for about 8 seconds before settling down to a 12-13% idle. On exit, CPU spikes to around 82% for about 8 seconds before settling down to a 12-13% idle.

The CPU spikes appear to be cumulative, i.e. if you open and close Notepad3 (with some history) several times fairly quickly, the CPU peaks higher and longer - and launch times increase. I have seen Notepad3 launch times of 1-4 seconds.

I first thought that perhaps the CPU spikes occurred because of history items that no longer existed, but the delay still occurs with the above list of 32 valid history items.

Notes:

  • I do not see similar CPU spikes when opening files in an already-running instance of Notepad3
  • The majority of the 12-13% CPU at idle is the screen recording software
  • The above findings are reproducible after a computer restart
  • After Test B, I can clear the history items and performance then returns to that seen in Test A
  • Like @AlexVallat, I do not see these CPU spikes and slow launch times in e.g. version 5.20.218.1 RC1

@RaiKoHoff
Copy link
Collaborator

Maybe related to issue #2332 ... 🤔

@RaiKoHoff
Copy link
Collaborator

Feel free to test the BETA version "Notepad3Portable_5.20.515.1_BETA.paf.exe.7z" or higher.
See "Notepad3 BETA-channel access #1129" or here Notepad3Portable_5.20.515.1_BETA.paf.exe.7z

Note1: "Notepad3Portable PAF" can be used in "2 flavors", see with or without extension ".7z".

Note2: If you follow the instructions #1105, you can also update your "Notepad3 Installer version" with the latest BETA version (see #1129).

Your comments and suggestions are welcome... 😃

@AlexVallat
Copy link
Author

I can confirm that this beta 5.20.515.1 resolves this issue - in my testing it starts at the same speed as 5.20.218.2.

Thanks for the quick solution!

@craigo-
Copy link

craigo- commented May 16, 2020

Yep, the CPU spikes on launch and close are confirmed gone in version 5.20.515.1. Thanks.

@hpwamr
Copy link
Collaborator

hpwamr commented Jul 29, 2020

Hello @AlexVallat ,
As far as I'm concerned, I think you (requester) can close this issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants