Google Groups

Re: heads up, master may be slower than before

Shawn Pearce May 2, 2012 9:10 AM
Posted in group: Repo and Gerrit Discussion
On Wed, May 2, 2012 at 8:51 AM, Martin Fick <> wrote:
> On Tuesday, May 01, 2012 08:17:17 pm Shawn Pearce wrote:
>> I submitted the new /changes/ JSON API code to master
>> this morning, and also submitted the changes to use it
>> in the search results web UI, and the user dashboard web
>> UI.
>> This afternoon I merged into my environment to start
>> looking at upgrading to
>> latest master. Unfortunately its a lot slower than
>> before. I am seeing page loads that should be ~300ms
>> taking ~4000ms. Locally I did not see this negative
>> performance hit in my local testing environment... maybe
>> because that was using the H2 database with a small data
>> set?  :-)
>> I'll continue to work on this tomorrow, but just thought
>> folks considering master should know it may be slower.
>> The slowdown might be unique to my environment. Or it
>> might not.
> Do we need to have an easy mechanism to perform the queries
> asynchronously (assuming they can be done in parallel)?

That is the general approach to "fix" this sort of problem, perform
queries in parallel to hide latency. gwtorm already supports loading
multiple entities at once by primary key using get(Set<K>) on any
access object. But I think the problem is the patch set approvals, we
load them using the byChange(Change.Id) query, or
byPatchSet(PatchSet.Id) query, neither of which has a Set overload to
perform multiple queries at once.

I'm not yet sure that is exactly where the performance problem is. I
tried some easy stuff yesterday evening, and it made a small impact,
but not enough.