- This topic has 4 replies, 2 voices, and was last updated 1 month, 3 weeks ago by
October 15, 2019 at 9:15 pm #183057
specifically i'm working with the simplysql module on github. if i import it with 64-bit powershell or ISE, it takes 1-2 seconds. if i import it with 32-bit powershell or ISE, it takes 30 seconds. i ran into this because i have a piece of purchased software that's running a 32-bit powershell environment, but then found i could reproduce the issue outside of the software. the software vendor can't reproduce the issue, and neither can the person who created the simplysql module. i've reproduced with multiple user accounts and machines, but all members of the same domain. i can't reproduce the issue on my windows 10 home machine, which is free from the group policies and other influences of my organization. so i'm admitting this is probably environmental. the software vendor's support suggested it might be antivirus or certificate revocation list checking. but i don't get why either of those (or anything else i can think of) would only affect 32-bit. and disabling antivirus has no effect.
the -verbose switch says that the entire import-module delay is happening before any of the functions/cmdlets are imported, so picking specific cmdlets doesn't help.
any ideas where else i should look?
October 15, 2019 at 9:56 pm #183060
similar significant delay with "ipmo pester" from 32-bit powershell vs 64-bit.
October 15, 2019 at 10:31 pm #183066ParticipantTopics: 0Replies: 115Points: 433Rank: Contributor
It's quite possible that the anti-virus software at the kernel level could be causing the issue. If you take a machine with anti-virus uninstalled does it still happen? What happens when you are looking at ProcMon? ProcMon can show you what is holding up the process when you do the import. The link below to Microsoft's download of ProcMon.
October 16, 2019 at 11:11 pm #183390
i put procmon on it prior to posting here. there's only around 700 entries per second just for powershell.exe during the 30-second import, so i'm still reading. 🙂
my home machine has no AV and it imports modules quickly in 32 bit and 64 bit. still working with my symantec admin to get it uninstalled from a test machine at the office.
i still don't understand why antivirus or execution policy or transcripting or anything else would only slow down 32-bit.
i'm also trying to run the psm1 file in chunks, but i cannot for the life of me figure out where this delay is.
October 16, 2019 at 11:52 pm #183396
interestingly, if i remove the module folder from any standard "module path" , and put it into some other folder (ie, on my desktop or c:\scripts), and call the psm1 file with its full path, it cuts the import time in half.
- You must be logged in to reply to this topic.