Bug 318421 - Static weaving - please improve processing speed and performance
Summary: Static weaving - please improve processing speed and performance
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-30 04:14 EDT by Igor Mukhin CLA
Modified: 2022-06-09 10:16 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Mukhin CLA 2010-06-30 04:14:30 EDT
Build Identifier: 20100617-1415

We use static weaving while development. For each build we wait 40 seconds for static weaving to process 20 entities on 2,4Gh 2Core PC.

Can it be improved?

Reproducible: Always

Steps to Reproduce:
1. Create some entities (something like 20)
2. Create ant file for static weaving
3. Run it 1000 times.
4. Wait 11 hours (40 sec * 1000)
5. Hate it.
Comment 1 Igor Mukhin CLA 2010-06-30 10:51:49 EDT
I just found out that, it only happens if you weave to the same direcotry, where the original classes are.

If you weave to somewhere else, it lasts just 5 seconds.
Comment 2 Igor Mukhin CLA 2010-06-30 12:51:06 EDT
I found out that the problem only occurs on Windows XP. 
My colleague has Windows 7 and the weaving lasts 5 seconds.

So I coded the weaving for WinXP in this way:
- rename /classes to /unweaved_<timestamp>
- waave from /unweaved_<timestamp> to /weaved_<timestamp>
- move from /weaved_<timestamp> to /classes

Only that way it works fast on WinXP.
Comment 3 Igor Mukhin CLA 2010-06-30 12:53:33 EDT
The possible solution is may be to not use URLClassLoader in org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcessor in process().

The line is:
        this.classLoader = new URLClassLoader(getURLs(), this.classLoader);


May be there is a classLoader that doesn't lock the files.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:08:33 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:16:06 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink