Page 1 of 1

[PSS 2018][Bug?] Performance switching between projects

Posted: Wed Feb 28, 2018 3:56 am
by Bosparan
PSS Version: 2018 5.5.149 x64
OS Version: Windows 10 x64 1709
WMF Version: 5.1

Impact: Medium

Symptoms:
When having a project open and loading / switching to another project, if the destination module is large, then PSS will freeze for a significant time, often making it faster to kill it and start a new process.
In case of opening the dbatools project, we are talking about several minutes to open it.

Reproducibility:
Open a project
Then open a very large project.
Grab a cup of coffee, you've got the time.

Notes:
You can find a significantly large PowerShell project here:
https://github.com/sqlcollaborative/dbatools

Re: [PSS 2018][Bug?] Performance switching between projects

Posted: Wed Feb 28, 2018 6:10 am
by mxtrinidad
So that I understand! Are you contributing with DBATools? Or, are you trying to integrate DBATools into an existing project?
I haven't heard from any of the DBATools contributors having some issues (yet!).

:)

Re: [PSS 2018][Bug?] Performance switching between projects

Posted: Wed Feb 28, 2018 6:42 am
by mxtrinidad
Hum! I just realized... The issue you're experiencing, is it when you Refresh the Local Cache?

Re: [PSS 2018][Bug?] Performance switching between projects

Posted: Wed Feb 28, 2018 12:16 pm
by Bosparan
mxtrinidad wrote: Wed Feb 28, 2018 6:10 am So that I understand! Are you contributing with DBATools? Or, are you trying to integrate DBATools into an existing project?
I haven't heard from any of the DBATools contributors having some issues (yet!).
Heya,

I'm Fred from the project. The only two project members that use it are me and Chrissy, both of us share the same issues, she simply delegates filing them to me (I'm her first line of PSS support in almost all instances).
mxtrinidad wrote: Wed Feb 28, 2018 6:42 am Hum! I just realized... The issue you're experiencing, is it when you Refresh the Local Cache?
It is literally what happens when you open the project file (see steps under "Reproducibility").
For that matter, I literally showed you on the last version. It got worse with the current version (or dbatools just experienced an insane jump ion size, but ... we are fast, but I don't think that fast).

Cheers,
Fred

Re: [PSS 2018][Bug?] Performance switching between projects

Posted: Fri Mar 02, 2018 10:30 am
by davidc
We are working on the performance and made progress.
But to provide some scope, I compared the current version of the module with the previous copy I had and it has grown from 269 files to 1215 files. So that definitely will have some impact. In addition, placing functions in individual files adds a lot of overhead when PowerShell Studio parses the files.

Re: [PSS 2018][Bug?] Performance switching between projects

Posted: Sat Mar 03, 2018 4:58 am
by Bosparan
Hi David,

no doubting it - dbatools is growing fast as far as modules are concerned. If your last copy was from April 2017 or something like that, there is really no comparison to how it rocks today! (And of course, yeah, the number of files has grown significantly over that time period)
I was however specifically addressing the change in the current update (that is on the 2018 update), after which we experienced a notable increase in time, as well as the fact that killing the process and loading the new project from scratch is actually faster than just opening the project (which I don't think is purely because of the project size).

That said one question:
Is there a technical reason why you need to parse them synchronously?
Theoretically, wouldn't it be possible to move that parsing into the background and just when it's done suddenly start providing Primal Sense. Would probably also require disabling refactoring tools until that's done. But for example, you could just parse the currently open files synchronously and allow the user to start editing, even if he doesn't get all the help he is used to have right away ...
Possibly as an option - per project or per PSS wouldn't really matter to me, though both would be nifty - in case you do not want to confuse users.

Cheers,
Fred

Re: [PSS 2018][Bug?] Performance switching between projects

Posted: Mon Mar 05, 2018 8:57 am
by davidc
Shifting things to the background isn't straight forward because some technical hurdles we have to overcome first (I will not go into them here). But we are investigating what steps we need take in order to do this in the future.

We already made some major improvements on loading speeds for the next service release.

Re: [PSS 2018][Bug?] Performance switching between projects

Posted: Thu Mar 08, 2018 11:05 am
by davidc
We released the new service build (v5.5.150) that addresses this issue.