Closed Bug 912153 Opened 11 years ago Closed 7 years ago

Bad performance when searching for test cases, high cpu usage for seconds

Categories

(Mozilla QA Graveyard :: MozTrap, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: aryx, Unassigned)

References

Details

(Whiteboard: [PT 77752204])

Firefox 23.0.1 on Windows XP SP3

Searching Moztrap for a test case by typing in its title is very slow, the CPU is at 100% for seconds.
Some steps -- note that this is heavily dependent on the CPU speed of the machine. On my desktop (an 8 core system with 12gb of RAM and a gigabit network connection) it's very fast. On my laptop, you see a quite a bit more sluggishness.

I think we're doing too much client side processing. Here are some steps:
1. Do not log in
2. Click on "Manage"
3. Click on "Cases" in the second header field - note the wait
4. In the search/filter box, type "music" - note the wait as you type, the wait on the suggested search
5. Choose music [description] from the drop down
6. Note the wait and the flicker in the screen as it builds the search result set.

This is even worse on a slow network connection.
Blocks: 993695
It would be good to try to reduce this bug down one particular thing that is slow and we can work from there. 

I can't really reproduce this locally (fast laptop, fast network) but every little step is a bit slow but I can't see any "crazy spikes" to hone in on. 

Any chance we can reduce this bug down to just one action that is reproducibly slow?
Whiteboard: [PT 77752204]
:peterbe - check out https://rpm.newrelic.com/accounts/263620/applications/4790252/traced_errors/2757801191, which I got when I followed Clint's STR in comment 1:

 django.db.utils:DatabaseError: (1213, 'Deadlock found when trying to get lock; try restarting transaction')

(I'll next attach the full stacktrace, for posterity/brevity, here.)
(In reply to Stephen Donner [:stephend] from comment #3)
> :peterbe - check out
> https://rpm.newrelic.com/accounts/263620/applications/4790252/traced_errors/
> 2757801191, which I got when I followed Clint's STR in comment 1:
> 
>  django.db.utils:DatabaseError: (1213, 'Deadlock found when trying to get
> lock; try restarting transaction')
> 
> (I'll next attach the full stacktrace, for posterity/brevity, here.)

The query before is what causes the mysql server to freeze up on us like that. 
I've seen some horribly horrible queries being sent to mysql from the REST API Django app. If we could better pair it down to not be allowed to do too crazy things, we might avoid many more deadlocks. Not a low-hanging-fruit thing to do though :(
Mass-closing remaining MozTrap bugs as WONTFIX, due to 1) the Mozilla-hosted instance being decommissioned (see https://wiki.mozilla.org/TestEngineering/Testrail), and, for now, 2) the still-up code archived at its GitHub page: https://github.com/mozilla/moztrap (we'll decide what's next for that, in the near future).

See also the history and more-detailed discussion which led us here, at https://groups.google.com/forum/#!topic/mozilla.dev.quality/Sa75hV8Ywvk

(If you'd like, you should be able to filter these notification emails using at least the unique string of "Sa75hV8Ywvk" in the message body.

Thanks!
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.