Bug 376595

Summary: Performance - Validation time could be cut 50% if we cache java text ranges
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: JPAAssignee: Karen Butzke <karenfbutzke>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: neil.hauge
Version: 3.0Keywords: api
Target Milestone: 3.3 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Karen Butzke CLA 2012-04-12 09:51:21 EDT
When validating a project with all java entities, 30-60% of the time in validation is spent building the ASTRoot for each java type in AbstractJavaPersistentType.validate(List<IMessage>, IReporter). That ASTRoot is only used for calculating text ranges. If we make the change to cache text ranges in the java resource model we could improve validation time drastically.

Would also have the added benefit of simplifying API since it would make the java and orm validation api the same.
Comment 1 Karen Butzke CLA 2012-09-06 11:40:49 EDT
There were multiple commits involved in this bug and quite a few provisional API changes. Many Java and Orm interfaces were deleted. The validation and completion proposal methods were changed. Now there is provisional API on JpaContextNode for getValidationTextRange(), validate(List<IMessage>, IReporter>), and getCompletionProposals(int). See the following commits for details and the new help for old friends document.

http://git.eclipse.org/c/dali/webtools.dali.git/commit/?id=a420fb18c36c264ec6b29b2c3fd1f77a6a9f54a9 - caching text ranges in JAXB resource model

http://git.eclipse.org/c/dali/webtools.dali.git/commit/?id=0c48289ad0c3a335b93ecf3da8e17f96121e0247 - stop building CompilationUnit for validation, removed CompilationUnit parameter from validation methods

http://git.eclipse.org/c/dali/webtools.dali.git/commit/?id=f58571464a578bec1cd744d569f975a66b460abb - refactored completion proposal methods to be identical in java and orm

http://git.eclipse.org/c/dali/webtools.dali.git/commit/?id=8ff91ca2965145b716ae25d6030ddd42613dfde2 - deleted JavaJpaContextNode and XmlContextNode

http://git.eclipse.org/c/dali/webtools.dali.git/commit/?id=37ab5884977fa7df0a3c86177a36cae41f6fe1a9 - deleted many Java and Orm interfaces that are no longer needed

http://git.eclipse.org/c/dali/webtools.dali.git/commit/?id=d1074325f2fb45d2d996ca555f40b09533a11d30 - fixed Java code completion filtering