Add thread-local caching to SectionManager

Description

Add thread-local caching to SectionManagerImpl.java to reduce db impact of student overview page.

Environment

None

Test Plan

None

Activity

Show:

Megan May May 12, 2008 at 3:44 PM

closing per stephens comments

Stephen Marquard May 7, 2008 at 6:35 AM

Tested on trunk with full regression test on Section Info using an expanded version of the test plan on Confluence.

Pls merge to 2-5-x.

Stephen Marquard April 19, 2008 at 1:48 PM

Hi Josh,

Please could you review the changes committed for this issue.

Stephen Marquard April 19, 2008 at 1:41 PM

r45572

This commit also changes the implementation of getSectionEnrollments(String userUid, String courseUuid) to use the new authz method authzGroupService.getAuthzUserGroupIds, so for 2-5-x and 2-4-x this introduces a dependency on (commits to authz). This actually does not introduce any performance advantages for the Student Overview case, but may have advantages for other uses.

With the changes in this issue, each authzgroup is now only read once. The number of SAKAI_REALM queries generated for the student overview page is now therefore 5 x number of sections in the site (e.g. 100 sections = 500 queries to render the page).

Not as good as it could be, but better than it was.

Stephen Marquard April 19, 2008 at 7:46 AM

Committed section_info_threadlocal_cached.diff from parent issue in r45570.

Testing with 10 sections in a local trunk build shows that queries to SAKAI_REALM* tables are reduced from 304 to 151.

Still not ideal, but some improvement is better than no improvement.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created April 19, 2008 at 7:42 AM
Updated October 27, 2009 at 1:45 PM
Resolved April 19, 2008 at 1:41 PM