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

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
Bosparan
Posts: 282
Joined: Sun Mar 03, 2013 12:45 pm

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

Post by Bosparan » Wed Feb 28, 2018 4:56 am

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

User avatar
mxtrinidad
Site Admin
Posts: 315
Joined: Sun Mar 03, 2013 12:42 pm

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

Post by mxtrinidad » Wed Feb 28, 2018 7: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!).

:)

User avatar
mxtrinidad
Site Admin
Posts: 315
Joined: Sun Mar 03, 2013 12:42 pm

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

Post by mxtrinidad » Wed Feb 28, 2018 7:42 am

Hum! I just realized... The issue you're experiencing, is it when you Refresh the Local Cache?

User avatar
Bosparan
Posts: 282
Joined: Sun Mar 03, 2013 12:45 pm

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

Post by Bosparan » Wed Feb 28, 2018 1:16 pm

mxtrinidad wrote:
Wed Feb 28, 2018 7: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 7: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

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

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

Post by davidc » Fri Mar 02, 2018 11:30 am

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.
David
SAPIEN Technologies, Inc.

User avatar
Bosparan
Posts: 282
Joined: Sun Mar 03, 2013 12:45 pm

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

Post by Bosparan » Sat Mar 03, 2018 5:58 am

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

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

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

Post by davidc » Mon Mar 05, 2018 9:57 am

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.
David
SAPIEN Technologies, Inc.

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

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

Post by davidc » Thu Mar 08, 2018 12:05 pm

We released the new service build (v5.5.150) that addresses this issue.
David
SAPIEN Technologies, Inc.