Issue Details (XML | Word | Printable)

Key: JRA-6601
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Scott Farquhar [Atlassian]
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JIRA

Eagerly Cache NodeAssociations

Created: 08/May/05 09:05 PM   Updated: 15/Oct/06 08:43 AM
Component/s: Backend / Domain Model
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Participants: Scott Farquhar [Atlassian]
Since last comment: 3 years, 22 weeks, 3 days ago
Labels:


 Description  « Hide
Currently we get the NodeAssociations from the database for each issue for every association. However, it may be useful to get these all in one database call.

We can cache them in a ThreadLocal, so that subsequent hits to the NodeAssociationManager doesn't incur the database hit. This may also reduce the need for the IssueCache.

From the current entities that we store in that table, it would make sense to cache them all:

insomniac=# select distinct source_node_entity from nodeassociation ;
source_node_entity
--------------------
Issue
Project
(2 rows)

insomniac=# select distinct sink_node_entity from nodeassociation ;
sink_node_entity
-----------------------
Component
IssueTypeScreenScheme
NotificationScheme
PermissionScheme
Version
(5 rows)

insomniac=# select distinct association_type from nodeassociation ;
association_type
------------------
IssueComponent
IssueFixVersion
IssueVersion
ProjectScheme

We should also bound this cache, so that in any thread that hits lots of NodeAssociations, we don't load them all into memory.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Scott Farquhar [Atlassian] added a comment - 08/May/05 09:17 PM
It appears that DefaultIssueLinkManager.getOutwardLinks() and getInwardLinks() could also benefit from this.