CLONE - Speed up DataSection.getExampleBuilder by not recreating for each http request

Description

Enabling ExampleGenerator.CACHING in [] significantly improved performance in ConsoleCheckCLDR. However, when SurveyTool is running, there's a problem with DataSection.getExampleBuilder:

1 2 3 4 5 6 private ExampleBuilder getExampleBuilder(CLDRFile file) { if (examplebuilder == null) { examplebuilder = new ExampleBuilder(sm.getBaselineFile(), file); } return examplebuilder; }

That "new ExampleBuilder()" gets called repeatedly even when all the simulated fast-voters (see survey-driver) are in the same locale. The cache doesn't persist long since each request from the client causes the server to create a new DataSection, which creates a new ExampleBuilder, which creates two new ExampleGenerator objects (one for englishFile, one for cldrFile).

Ideally the whole DataSection object could be re-used for multiple http requests as much as possible. This ticket should investigate that and other possible ways of re-using ExampleBuilder objects.

xpath

None

locale

None

Status

Priority

major

Assignee

Thomas Bishop

Reporter

Thomas Bishop

tracReporter

tbishop

Reviewer

Mark Davis

Labels

Components

Fix versions

phase

final
Configure