Bug 127130 - build.webkit.org/dashboard should not request 50 revisions from trac each time
Summary: build.webkit.org/dashboard should not request 50 revisions from trac each time
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P3 Normal
Assignee: Alexey Proskuryakov
Depends on:
Reported: 2014-01-16 12:19 PST by Alexey Proskuryakov
Modified: 2014-08-19 00:38 PDT (History)
2 users (show)

See Also:

proposed patch (9.21 KB, patch)
2014-08-18 17:44 PDT, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2014-01-16 12:19:50 PST
The dashboard should be smarter about how much data it requests from Trac. Currently, it requests 50 most recent revisions, which is OK for the first request, but makes little sense to do every 45 seconds.

We should ask for fewer revisions, and fall back to a larger range on the rare occasions when there are lots of them landed at once.
Comment 1 Alexey Proskuryakov 2014-01-16 12:27:14 PST
Also, there is some code in Trac to maintain client sessions. I'm not sure what exactly it does, maybe it could be used to optimize performance of periodic requests?

We'd need to allow CORS credentials for the timeline on the server, and enable XHR.withCredentials on the client to have cookies sent.
Comment 2 Alexey Proskuryakov 2014-01-16 12:30:05 PST
On the second thought, so session tracking through cookies could get tricky when reloading the dashboard page, or having two dashboard windows open for any reason.
Comment 3 Alexey Proskuryakov 2014-08-18 17:44:31 PDT
Created attachment 236791 [details]
proposed patch

Found a different way to make the trac request faster. We don't necessarily get more close to "give me what changed since the last time", but Trac processes date based requests much faster.

Talking about sessions, those don't seem to help, they are for logged in users and only used for credentials and settings like time zone. Having a session would actually be harmful here, as we'd get times converted.
Comment 4 WebKit Commit Bot 2014-08-19 00:38:00 PDT
Comment on attachment 236791 [details]
proposed patch

Clearing flags on attachment: 236791

Committed r172747: <http://trac.webkit.org/changeset/172747>
Comment 5 WebKit Commit Bot 2014-08-19 00:38:04 PDT
All reviewed patches have been landed.  Closing bug.