[
https://jira.jboss.org/browse/JBIDE-7069?page=com.atlassian.jira.plugin.s...
]
Andre Albino Pereira updated JBIDE-7069:
----------------------------------------
Workaround Description: See (PublishCopyUtilChanges.txt attachment). (was: Returning
true instead of setting "renamedSafely" to true avoids Thread.sleep(100) to be
executed:
private boolean safeRename(File from, File to, int retrys) {
// make sure parent dir exists
File dir = to.getParentFile();
if (dir != null && !dir.exists())
dir.mkdirs();
int count = 0;
while (count < retrys) {
if (from.renameTo(to))
return true;
count++;
// delay if we are going to try again
if (count < retrys) {
try {
Thread.sleep(100);
} catch (Exception e) {
// ignore
}
}
}
return false;
})
Description: 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
(see PublishCopyUtilOriginal.txt attachment). So, if a EAR with 1000 files is deployed, it
will waste around 1.6 min executing Thread.sleep(100). (was: 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). )
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 (see
PublishCopyUtilOriginal.txt attachment). 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