Closed
Bug 553246
Opened 15 years ago
Closed 15 years ago
configuration API is slow, takes 10+ seconds
Categories
(Webtools Graveyard :: BzAPI, defect)
Webtools Graveyard
BzAPI
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: axel, Assigned: gerv)
References
()
Details
The configuration API is slow, from here it takes more than 10 seconds to load. Just now as slow as 20 seconds even.
Assignee | ||
Comment 1•15 years ago
|
||
Sadly, it's Bugzilla's config.cgi being slow rather than the BzAPI :-(
Mar 18 04:28:49 [INFO] https://api-dev.bugzilla.mozilla.org/0.5/configuration GET => https://bugzilla.mozilla.org/config.cgi?ctype=json
Mar 18 04:29:05 [INFO]
.----------------------------------------------------------------+-----------.
| Action | Time |
+----------------------------------------------------------------+-----------+
| Request | 15.57253- |
| | 1s |
| Bugzilla GET request | 15.56421- |
| | 6s |
'----------------------------------------------------------------+-----------'
Mar 18 04:29:07 [INFO] https://api-dev.bugzilla.mozilla.org/0.5/configuration GET => https://bugzilla.mozilla.org/config.cgi?ctype=json
Mar 18 04:29:17 [INFO]
.----------------------------------------------------------------+-----------.
| Action | Time |
+----------------------------------------------------------------+-----------+
| Request | 10.23367- |
| | 9s |
| Bugzilla GET request | 10.22513- |
| | 3s |
'----------------------------------------------------------------+-----------'
:-( I've looked at config.cgi and I can't see any parameters I can use to make it work faster.
Gerv
Assignee | ||
Comment 2•15 years ago
|
||
I also used Firebug to get metrics from the browser side. The Firebug figure was higher. The difference is partly because it takes 1.38s to transfer the data - 273kbytes, so 200kbytes per sec, or 1.6Mbit. That could be reduced if you didn't ask for the flag data ("flags=0"). But there's also an extra 1s or so somewhere between the browser sending the request and my code starting to run, and/or between my code finishing and the server starting to return data. Not sure what's going on there.
But still, the lion's share of the problem is with b.m.o. Also, b.m.o. varies in its response time between 9s and 29s for the same request, only a few seconds apart.
Gerv
Comment 3•15 years ago
|
||
What's slow in config.cgi is the product data. You can set a product= param to eliminate or limit per-product data. Also, 3.6 supports etags for that data, so you will be able to avoid transfering the data if it hasn't changed.
Assignee | ||
Comment 4•15 years ago
|
||
Max: the eTag support happens after the data is collected (the tag is a hash of the collected data), so using eTags will only cut down the 1.38 seconds of data transfer time, not the 9-29 seconds of data assembly time.
Do you know why gathering the product data is so slow? Should we file a bug on speeding that up?
Axel: what data are you wanting from the configuration output?
Gerv
Reporter | ||
Comment 5•15 years ago
|
||
Technical comment, I don't see the ETag header here. Maybe the load balancer or something strips those?
As for the data, I'm trying to get all components in the "Mozilla Localizations" product right now. That code will change to getting all products and components in the the "Mozilla in Your Language" categorization soon :-).
So I really only need a tiny fraction of the data that's offered.
Assignee | ||
Comment 6•15 years ago
|
||
b.m.o. is running 3.4, not 3.6. Hence no eTag.
(Also, I haven't upgraded the proxy to cope with that sort of response yet!)
I will add product-based restrictions to the API.
Gerv
Comment 7•15 years ago
|
||
(In reply to comment #4)
> Do you know why gathering the product data is so slow? Should we file a bug on
> speeding that up?
Oh, yes, it should be preloading. I have no idea why it isn't. Let me file the bug and attach a patch. It's so simple that we should easily be able to fix it even for 3.4.
Assignee | ||
Comment 8•15 years ago
|
||
OK, Max has added preloading and support for flags=0, which I've now added to the BzAPI so it passes the parameter through. I think these changes together should solve the performance problem.
Gerv
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•