Bug 298985 - Improve general performance and concurrency
Summary: Improve general performance and concurrency
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: James Sutherland CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2010-01-06 14:37 EST by James Sutherland CLA
Modified: 2022-06-09 10:16 EDT (History)
3 users (show)

See Also:


Attachments
revives building objects from resultsets prototype, some uow micro (170.82 KB, patch)
2010-01-06 14:45 EST, James Sutherland CLA
no flags Details | Diff
changes primary key typing from Vector to Object, part 1 (165.62 KB, patch)
2010-01-11 13:09 EST, James Sutherland CLA
no flags Details | Diff
switches remain primary key methods from vector to object (201.36 KB, patch)
2010-01-13 13:04 EST, James Sutherland CLA
no flags Details | Diff
changes pk usage from vector to id value or CacheId (398.47 KB, patch)
2010-01-26 13:02 EST, James Sutherland CLA
no flags Details | Diff
adds jpcache extensions (100.90 KB, patch)
2010-02-01 10:11 EST, James Sutherland CLA
no flags Details | Diff
Some improvements for ResultSetOptimizedQuery (16.73 KB, patch)
2013-02-06 17:46 EST, Andrei Ilitchev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Sutherland CLA 2010-01-06 14:37:52 EST
Bug used to log 2.1 performance enhancement work under.

Some ideas for this release are:
- improved building object in unit of work, avoid duplicate cache access
- investigate building objects direct from JDBC ResultSets (no rows)
- investigate re-architecting CacheKey, instead use primitive for singleton primary keys, split CacheKey and CacheValue
- investigate inserting object directly to JDBC Statements
- investigate a low memory mode, clear all memory before login (ox projects, intern strings, resize collections, static empty collections)
Comment 1 James Sutherland CLA 2010-01-06 14:45:04 EST
Created attachment 155445 [details]
revives building objects from resultsets prototype, some uow micro
Comment 2 James Sutherland CLA 2010-01-06 14:49:42 EST
Got the old prototype of building objects from resultset working again.  Added a JPA performance comparison test suite to compare its performance.

Did some micro build object optimizations.  Avoiding some duplicate cache checks in the uow object building.

Added a test suite for the uow merge using change sets (cache synch with new objects).
Comment 3 James Sutherland CLA 2010-01-06 15:42:43 EST
Design doc added,

http://wiki.eclipse.org/EclipseLink/DesignDocs/298985
Comment 4 James Sutherland CLA 2010-01-11 13:09:17 EST
Created attachment 155774 [details]
changes primary key typing from Vector to Object, part 1
Comment 5 James Sutherland CLA 2010-01-11 15:19:36 EST
SVN main commit: Bug#298985 - change primary key from vector to object

https://bugs.eclipse.org/bugs/show_bug.cgi?id=298985

Changes:
- First part of changing primary key type from Vector to Object, changes identity map methods to take Object, Vector is still passed, only the typing was changed so far.
- Removed some unused imports/casts.
- Added some @Override annotations. 

Code review: Gord
Comment 6 James Sutherland CLA 2010-01-13 13:04:51 EST
Created attachment 156022 [details]
switches remain primary key methods from vector to object
Comment 7 James Sutherland CLA 2010-01-13 13:10:11 EST
SVN main commit: bug#298985 - changing primary key from vector to object

https://bugs.eclipse.org/bugs/show_bug.cgi?id=298985

Changes:
- Switching remain primary key methods from Vector to Object, (Vector is still always used internally), ObjectBuilder, sessions, queries
- Deprecated old public API that used Vector in IdentityMapAccessor, Session, ReadObjectQuery, ReportQuery
- Removed some dead code, added some @Overrides

Code review: Gord
Comment 8 James Sutherland CLA 2010-01-26 13:02:58 EST
Created attachment 157311 [details]
changes pk usage from vector to id value or CacheId
Comment 9 James Sutherland CLA 2010-01-26 13:03:20 EST
SVN main commit: bug#298985 - cache ids

https://bugs.eclipse.org/bugs/show_bug.cgi?id=298985

Code review: Gord, Andrei

Changes:
- Changes primary key used in cache and object building to be the id value, or a CacheId instead of Vector.
- Changes weaved code to store Object id instead of Vector.
- Updates XMLObjectBuilder and moxy mappings to use CacheId instead of Vector for document preservation.
- Updates DynamicEntity to use Object id instead of Vector.
- Added some @Override, removed some dead code, some changes from Vector to List.
Comment 10 James Sutherland CLA 2010-02-01 10:11:04 EST
Created attachment 157786 [details]
adds jpcache extensions
Comment 11 James Sutherland CLA 2010-02-01 10:25:41 EST
SVN main commit: Bug#301063 - fix to query cache, jpa cache interface and extensions

https://bugs.eclipse.org/bugs/show_bug.cgi?id=301063

https://bugs.eclipse.org/bugs/show_bug.cgi?id=298985

Doc,
http://wiki.eclipse.org/EclipseLink/DesignDocs/298985

Changes:
- Fixed java doc on query hints for query cache.
- Added check for CacheKeyType.AUTO, and exception for invalid type to descriptor.
- Ensure session cache object is built when using query cache, so it can be cached.
- Fixed validateCache() to work for descriptors that are not cached (aggregates).
- Changed query cache method to take List instead of Vector for params.
- Removed some duplicate code in olr query.
- Ignore null temp result is query cache (objects not built in session cache), use invalid object to represent null/empty.
- Added tests for new JpaCache API.
- Added tests for query caching inside uow of work and early transaction.
- Added extended cache API to JPA Cache, added JpaCache interface.

Code review: Andrei, Gord
Comment 12 Karen Butzke CLA 2010-03-23 16:53:00 EDT
James, I just want to mention that in PrimaryKeyMetadata the m_cacheKeyType is not being populated from the metadata.  Also, is this support going to be added to the eclipselink-orm.xml schema for 2.1?
Comment 13 James Sutherland CLA 2010-06-23 10:03:02 EDT
closing for 2.1
Comment 14 Andrei Ilitchev CLA 2013-02-06 17:46:35 EST
Created attachment 226667 [details]
Some improvements for ResultSetOptimizedQuery

Some improvements for ResultSetOptimizedQuery (part of old
 bug 298985): now works with descriptor with multiple tables
 and handles reference mappings, too. Still to be done -
 proper cloning and registering all the objects.
Comment 15 Eclipse Webmaster CLA 2022-06-09 10:10:21 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 16 Eclipse Webmaster CLA 2022-06-09 10:16:09 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink