<< Back to previous view |
[QB-2107] Slow performance while executing batch file on Windows
|
|
Status: | Closed |
Project: | QuickBuild |
Component/s: | None |
Affects Version/s: | 5.1.11 |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Irina Kotlova | Assigned To: | Robin Shen |
Resolution: | Fixed | Votes: | 0 |
Remaining Estimate: | Unknown | Time Spent: | Unknown |
Original Estimate: | Unknown | ||
Environment: | Windows 2008 Server R2 |
File Attachments: | create-poms.bat no_ant_full-log.txt |
Description |
We generate multiple pom.xml files from pom-template.xml in the project directory. It comes down to substituting several version properties. The substitution is done in create-poms.bat/create-poms.sh script. SED is used on both platforms. Unix substitution goes well - no problems are encountered. On Windows however there is a problem: if run locally substitution gets done in about 10-15 seconds; if run in QuickBuild, the substitution runs for about 27 minutes.
I cannot get to the cause of this performance issue. - we use sed.exe from git 1.7.4; - tried running create-poms.bat directly without Ant - no improvement; - tried first generating the list of poms to convert, followed by processing the list - no improvement. Please advise how to approach the issue. Thanks. |
Comments |
Comment by Irina Kotlova [ 02/Jul/14 09:52 PM ] |
This is the script that gets executed. |
Comment by Irina Kotlova [ 02/Jul/14 09:56 PM ] |
The substitution started at 4:46 PM, ended at 05:04 PM. This is way too long time. (I added additional logging to the script.) In comparison Unix runs for 4 seconds. |
Comment by Robin Shen [ 03/Jul/14 12:15 AM ] |
I guess this might be caused by some environmental issues. Please run the agent (or server) running this step in console mode by stopping it and issuing "bin/agent.bat console" (or "bin/server.bat console" if it is a server) from the same command prompt where the batch file runs fast. Then run the batch in QB again to see what happens. |
Comment by Irina Kotlova [ 03/Jul/14 06:00 PM ] |
Oops - always forget to try console mode. It is because I was not expecting QuickBuild doing something wrong :-) was assuming anti-virus is a player here or something else.
So, in console mode the script got executed in just 6 seconds! Is there a way to fix this without switching to the console mode? Console mode is less secure and a bit more complex to maintain, because it requires to set up automatic service startup on reboot, it means that the build user password should be put in the registry, anybody unlocking the system immediately gets access to it. Thanks! |
Comment by Irina Kotlova [ 03/Jul/14 07:29 PM ] |
The problem now is fixed: I switched to SourceForge's sed.exe from UnixUtils. Sorry for the hassle. |
Comment by Robin Shen [ 03/Jul/14 11:28 PM ] |
Normally it is an environmental issue if some things works normally if run from command line but not from QB. So running QB in console mode is to make sure that they use the same environments. In this case, the sed.exe from git might not work normally when calling from a background Windows service. |