[jbosstools-issues] [JBoss JIRA] Updated: (JBIDE-7069) Application publishing is very slow
Andre Albino Pereira (JIRA)
jira-events at lists.jboss.org
Wed Sep 15 09:12:29 EDT 2010
[ https://jira.jboss.org/browse/JBIDE-7069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andre Albino Pereira updated JBIDE-7069:
----------------------------------------
Attachment: PublishCopyUtilChanges.txt
Patch addressing the unnecessary Thread.sleep(100) at PublishCopyUtil.safeRename(File,File,int)
> Application publishing is very slow
> -----------------------------------
>
> Key: JBIDE-7069
> URL: https://jira.jboss.org/browse/JBIDE-7069
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: JBossAS
> Affects Versions: 3.2.0.M2
> Environment: Ubuntu 10.4 x64, jdk1.6.0_21, jboss-4.0.5-GA, Eclipse Helios (build 20100617-1415)
> Reporter: Andre Albino Pereira
> Assignee: Rob Stryker
> Attachments: PublishCopyUtilChanges.txt
>
>
> It seems there's a bug when a resource to be published is moved to the deploy folder using PublishCopyUtil.safeRename(File, File, int), where a unnecessary Thread.sleep(100) is executed every time for each resource that is being moved:
> private boolean safeRename(File from, File to, int retrys) {
> boolean renamedSafely = false;
> // make sure parent dir exists
> File dir = to.getParentFile();
> if (dir != null && !dir.exists())
> dir.mkdirs();
>
> int count = 0;
> while (count < retrys && !renamedSafely) {
> if (from.renameTo(to))
> renamedSafely = true; // <------ it should return true right here, since it's not, a unnecessary Thread.sleep(100) is executed.
>
> count++;
> // delay if we are going to try again
> if (count < retrys) {
> try {
> Thread.sleep(100);
> } catch (Exception e) {
> // ignore
> }
> }
> }
> return renamedSafely;
> }
> So, if a EAR with 1000 files is deployed, it will waste around 1.6 min executing Thread.sleep(100).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list