This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
On a web application on Tomcat invoke the Entity Classes from DB wizard, select a data source, some tables and press Next. In the Package text field enter "entity". There is a noticeable delay after each key press, which seems caused by the check for a persistence provider.
Created attachment 39695 [details] Unfinished changes improving the performance of PersistenceLibrarySupport
The attachment (sorry for the application/octet-stream) contains some unfinished changes to PersistenceLibrarySupport which significantly improve the performance on my machine. I say unfinished because the other containsPath() and containsService() methods could probably be improved as well. And since I'm at it, getFirstProviderLibrary() and getLibrary() could be improved too to. Reassign to me when done. I'll also modify EntityClasses to cache the result of PersistenceLibrarySupport.getProvidersFromLibraries().
Thanks for the patch. If you would happen to have any idea from where the methods originally came from (my understanding is that the original versions might have been copied from somewhere), it would be nice to improve the original code as well. I know that the methods used to reside in o.n.m.j2ee.metadata.Utils, but that's about it.
No idea, today was the first time that I saw these methods.
I've applied the patch a while ago (apr 18th), other improvements are still pending. Setting the target milestone to 6.0.
I made some further optimizations, mainly in the getLibrary method (by avoiding multiple calls to getLibraryClassPath and extractProvider). Not sure whether it made much difference though as I didn't make any exact measurements and can't tell for sure just by invoking the wizard. Please feel free to optimize to a greater extent if you like. Checking in PersistenceLibrarySupport.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/wizard/library/PersistenceLibrarySupport.java,v <-- PersistenceLibrarySupport.java new revision: 1.8; previous revision: 1.7 done
The previous commit removed the sorting from the getProvidersFromLibraries method, added it back: Checking in PersistenceLibrarySupport.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/wizard/library/PersistenceLibrarySupport.java,v <-- PersistenceLibrarySupport.java new revision: 1.9; previous revision: 1.8 done
Now also caching the result of PersistenceLibrarySupport.getProvidersFromLibraries() in EntityClassesPanel and closing. Checking in src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/EntityClassesPanel.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/EntityClassesPanel.java,v <-- EntityClassesPanel.java new revision: 1.11; previous revision: 1.10 done