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
Slow module loading #779
Comments
Hey @burnbay - we had the same issues and fixed it in 8.0.902 -- please update and let me know if you continue to have issues. |
Hi. On version 8.0.902 I'm just getting "Install-Package : Illegal characters in path" Version 8.0.900 works fine on installation. |
Dang, can you try Uninstall-Module dbatools -AllVersions See if you continue to get encoding issues? And if so, try this (temporarily)
Let me know if any of those work. I can install dbatools no problem on both Win10 and Server2016 so I'm trying to find the culprit. If you continue to have issues,c an you please paste the whole error? Thanks! |
Removed all verssions and then ran Install-Module dbatools -Force: Invoke-Expression (Invoke-WebRequest -UseBasicParsing https://dbatools.io/in) worked! |
WTF agghh. k, thanks. Will try to figure out what is up and fix that. My apologies. How's the new loading time? |
Breaks my heart to see 10 seconds -- on a regular machine, that should be subsecond (v 0.8.900 was 3 secs). @PowerDBAKlaas looked into this too and found it's a GPO setting. Klaas, did you ever find which specific setting increased the time? |
Well ... compared to 12 minutes it's blazing fast :) |
LOL!! Oh man, I thought that was 12 seconds to 10 seconds! Torturous! FWIW, the offending line was in an older copy of Invoke-Sqlcmd2, so your system really doesn't like |
Would be really interesting to know what GPO setting that was @PowerDBAKlaas? Our IT department love GPO's a bit too much IMO |
Can you show what: |
I used to have slow loading. But the latest release is super fast for me. |
@burnbay that's different from what I had, but it can still be a problem: Instead of the executionpolicy, a registry key should be set in the GPO. Tobias wrote this blog post after our conversation on my module loading times (63 sec): |
Thanks so much for the link @PowerDBAKlaas! Tweeted it. |
@gbargsley - yeah, seems I introduced the slowness in middle of December 👎 |
@burnbay - please try to install the latest version (0.8.903) from the gallery, I updated a bunch of encoding. |
Sorry to say .... |
dangit. what language is your windows? it's win10 right? |
Heya, we're having some trouble reproducing the issue.
|
Also can you then
See what happens? |
@ctrlbold Works like a charm with Save-Module, then Import-Module. @FriedrichWeinmann System: |
Hi, thanks for the data. I went through it, was a bit at a loss and set up an identical machine:
This - combined with your own example of saving and importing the module - strongly implies that something on your machine is broken, either PowerShellGet, PackageManagement, PowerShell or .NET in general. Recommended steps to solve this:
The first is generally safe. For 2 & 3, copying the existing module directory as backup is sufficient but recommended. Before doing the .NET repair I highly recommend making sure you've got a backup of the server. It's usually safe to use, but 'usually' and 50 cent will get you a coke. |
Wow! What an effort. Thank's so much. I suspect something is broken too. Never had any problems before on this particular machine, but I don't control software installation/patching. Could be that something's been done. Anyway, will look into it tomorrow. |
Hey, no worries :) |
Still, installing version 0.8.900 works great on the same machine. Tried on a different server now and the same error. W2K12R2 with CurrentCulture nb-NO and CurrentUICulture en-US, same as the first server. Installing version 0.8.900 works on both. |
Interesting! The thing that drives me crazy is that it used to work. Can
you do one more thing the next time you come across that error? Paste the
results of
$error[0] | select *
…On Tue, Feb 21, 2017 at 9:36 AM, burnbay ***@***.***> wrote:
Tried on a W7EntSp1 with no luck:
[image: image]
<https://cloud.githubusercontent.com/assets/2721929/23156863/f06df1ca-f818-11e6-9401-2248d09c90b8.png>
$host:
[image: image]
<https://cloud.githubusercontent.com/assets/2721929/23156875/fded792e-f818-11e6-8716-cb9b92a74e9b.png>
Will try upgrading to WMF 5.1 on the W7 machine. To be continued ....
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#779 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AH5QES2m5Pvi2E913X5I9qlj-mtYYhLrks5reqIegaJpZM4MGJIv>
.
|
Nevermind, @sanderstad ran it with that and it didn't provide adequate info :/ |
Well @FriedrichWeinmann and @ctrlbold ..... worked out just fine with WMF 5.1 on W2K12R2 too: A bit bugged by the error on WMF 5.0. I guess a lot of people run that version. Thanks for all your help! |
Damn, and I figured out what buggered my test: One of our trainees had patched my templates and forgotten to mention it to me * grml * |
Also, for anyone who is having an issue with the Illegal characters in path please post the output of I am seeing reinstalling fixing issues and a few other projects on gh reporting specific nuget version issues, so this would be very helpful to isolate the issue. Thanks! |
I got another report via email D: I'll ask him to run |
Talked to @sanderstad, looks like the location of the nuget executable might be local to the issue, going to find the exact location and report back which nuget version you want to get :) |
Yessssss! |
hey @burnbay, can you run this
Let us know and we'll compare with @sanderstad's |
Here is my "little" list |
Here's my list |
Thank you both! |
agggh, it doesnt look like a recent update caused the problem 👎 |
I am so pleased to say that both the speed and the illegal characters issue has been resolved by @ConstantineK and @FriedrichWeinmann in v0.8.938 ck found out after recompiling some DLL's that loading the module faster with the . caused illegal chars. This commit shows our ultimate solution by @FriedrichWeinmann Module now loads on my machine at 1.5 secs avg. |
Great news! |
Hi.
I'm experiencing really slow loading times on the dbamodule. Looks like it's the same pattern on different machines. From what I can see it's the dot sourcing of all the function files that's taking time.
Read about the same issue here: http://superuser.com/questions/1170619/is-dot-sourcing-slower-than-just-reading-file-content
So I replaced all function loading with Invoke-Expression and that made a significant performance boost.
Before:
After:
It's not a module bug I guess, but more a Powershell runtime problem. Does anybody experience the same problems?
System Details
Operating system name and version:
Windows Server 2012 R2 Standard
Output from
$PSVersionTable
:PSVersion 5.0.10586.117
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.10586.117
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Output of dbatools version:
0.8.900
SQL Server version for source/target
SQL Server 2016 SP1
The text was updated successfully, but these errors were encountered: