I am summarizing here the findings, there are problems in different areas: favorites API is taking longer than usual and then SSE /configure API takes really long time. search API also takes long time, we can improve it but I am not too sure given how we want flattened/sorted list.
Key Findings (actionable/'to be investigated' items)
SSE
- SSE configure call takes really long time (~10sec) for job channel subscription
(there are two job subscriptions)
"subscribe": [
{
"jenkins_channel": "job"
}
,
{
"jenkins_channel": "job"
}
],
- SSE configure for pipeline channel is relatively less but still long time (3-4 sec)
- Avoid redirection by appending ‘/‘. GET /js-extensions costs 61ms
- Run details page calls SSE configure API 5 times each taking on average ~2secs.
Favorites API (page limit 26)
- GET takes unreasonably long time 5.56 sec and there is only one favorited item!!!
- Favorite item is a pipeline object that includes latest Run. It also includes actions (changeset, branch details) so interacting with git (file IO, hope it doesn’t go all the way to github for that)? Needs investigation
Search API (page limit 26)
- Took 7 sec on average
- To address sorting by name and exclude certain items from flattening all possible items are loaded in memory
- jenkins.getAllItems()
- Exclude items that are children of multi-branch and matrix project
- Don’t see how we can avoid it unless the jobs are stored in some kind of db with indexed column to speed up sorting and only give limited records instead of all
- new PipelineContainerImpl().getPipelines(items) should be pagination aware
- At present it creates BluePipeline object for all possible items (ouch!)
Static Resources
- blueocean.js (642KB), 370 ms to load: is loaded on each page (dashboard, run details, pipeline)
- An so are most other JS files
- If these are cached (not fetched for each page can easily save few secs)
Further details:
Dashboard
GET http://10.10.1.130:8080/sse-gateway/listen/jenkins_blueocean-1473319896763-1yloru4qt6xwe32wewmi 30.08 sec
This should be ok as this is SSE channel to get server side events, this connection remains opened for server to send events whenever there is data.
POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec
GET http://10.10.1.130:8080/blue/rest/users/XXX/favorites/ 5.56 sec
GET http://10.10.1.130:8080/blue/rest/search/ 7.10 sec
Js-extensions
GET http://10.10.1.130:8080/blue/js-extensions 61ms (redirect)
GET http://10.10.1.130:8080/blue/js-extensions/ *8ms *
append ‘/‘ in initial GET http://10.10.1.130:8080/blue/js-extensions can save 61ms.
Project/Pipeline page
POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec
GET http://10.10.1.130:8080/blue/rest/users/XXX/favorites/ 5.56 sec
GET http://10.10.1.130:8080/blue/rest/search/ 7.10 sec
GET http://10.10.1.130:8080/blue/rest/search/ 2.16 sec (Why second call)!!!
GET http://10.10.1.130:8080/blue/rest/organizations/jenkins/pipelines/XXXX/activities/ 18.99 sec
append ‘/‘ in initial GET http://10.10.1.130:8080/blue/js-extensions can save 61ms.
Run page
http://10.10.1.130:8080/adjuncts/807c3957/io/jenkins/blueocean/blueocean.js (642.28KB) 370 ms (why is it loaded on this page)?
GET http://10.10.1.130:8080/blue/rest/search/ 7.10 sec
GET http://10.10.1.130:8080/blue/rest/search/ 2.16 sec (Why second call)!!!
GET http://10.10.1.130:8080/sse-gateway/listen/jenkins_blueocean-1473319896763-1yloru4qt6xwe32wewmi 30.08 sec
POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec
GET http://10.10.1.130:8080/blue/rest/users/XXX/favorites/ 5.56 sec
SSE Job Channel
POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec
Why 5 subscription calls to ‘pipeline’ channel?
POST http://10.10.1.130:8080/sse-gateway/configure 3.03 sec (channel pipeline)
POST http://10.10.1.130:8080/sse-gateway/configure 19 ms (channel pipeline)
POST http://10.10.1.130:8080/sse-gateway/configure 2.03 sec (channel pipeline)
POST http://10.10.1.130:8080/sse-gateway/configure 2.77 sec (channel pipeline)
POST http://10.10.1.130:8080/sse-gateway/configure 4.45 sec (channel pipeline)
GET http://10.10.1.130:8080/blue/rest/organizations/jenkins/pipelines/XXX/branches/XXX/runs/1/log/ 90ms
Gives 500 as there are no log file for this job.
I am summarizing here the findings, there are problems in different areas: favorites API is taking longer than usual and then SSE /configure API takes really long time. search API also takes long time, we can improve it but I am not too sure given how we want flattened/sorted list.
Key Findings (actionable/'to be investigated' items)
SSE
(there are two job subscriptions)
"subscribe": [
{ "jenkins_channel": "job" }
,
{ "jenkins_channel": "job" }],
Favorites API (page limit 26)
Search API (page limit 26)
Static Resources
Further details:
Dashboard
GET http://10.10.1.130:8080/sse-gateway/listen/jenkins_blueocean-1473319896763-1yloru4qt6xwe32wewmi 30.08 sec
This should be ok as this is SSE channel to get server side events, this connection remains opened for server to send events whenever there is data.
POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec
GET http://10.10.1.130:8080/blue/rest/users/XXX/favorites/ 5.56 sec
GET http://10.10.1.130:8080/blue/rest/search/ 7.10 sec
Js-extensions
GET http://10.10.1.130:8080/blue/js-extensions 61ms (redirect)
GET http://10.10.1.130:8080/blue/js-extensions/ *8ms *
append ‘/‘ in initial GET http://10.10.1.130:8080/blue/js-extensions can save 61ms.
Project/Pipeline page
POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec
GET http://10.10.1.130:8080/blue/rest/users/XXX/favorites/ 5.56 sec
GET http://10.10.1.130:8080/blue/rest/search/ 7.10 sec
GET http://10.10.1.130:8080/blue/rest/search/ 2.16 sec (Why second call)!!!
GET http://10.10.1.130:8080/blue/rest/organizations/jenkins/pipelines/XXXX/activities/ 18.99 sec
append ‘/‘ in initial GET http://10.10.1.130:8080/blue/js-extensions can save 61ms.
Run page
http://10.10.1.130:8080/adjuncts/807c3957/io/jenkins/blueocean/blueocean.js (642.28KB) 370 ms (why is it loaded on this page)?
GET http://10.10.1.130:8080/blue/rest/search/ 7.10 sec
GET http://10.10.1.130:8080/blue/rest/search/ 2.16 sec (Why second call)!!!
GET http://10.10.1.130:8080/sse-gateway/listen/jenkins_blueocean-1473319896763-1yloru4qt6xwe32wewmi 30.08 sec
POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec
GET http://10.10.1.130:8080/blue/rest/users/XXX/favorites/ 5.56 sec
SSE Job Channel
POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec
Why 5 subscription calls to ‘pipeline’ channel?
POST http://10.10.1.130:8080/sse-gateway/configure 3.03 sec (channel pipeline)
POST http://10.10.1.130:8080/sse-gateway/configure 19 ms (channel pipeline)
POST http://10.10.1.130:8080/sse-gateway/configure 2.03 sec (channel pipeline)
POST http://10.10.1.130:8080/sse-gateway/configure 2.77 sec (channel pipeline)
POST http://10.10.1.130:8080/sse-gateway/configure 4.45 sec (channel pipeline)
GET http://10.10.1.130:8080/blue/rest/organizations/jenkins/pipelines/XXX/branches/XXX/runs/1/log/ 90ms
Gives 500 as there are no log file for this job.