Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#6203 Bulk edit times out

forge-jun-28
closed
nobody
42cc (358)
General
0
2013-06-26
2013-05-03
Dave Brondsema
No

When saving a bulk edit of allura tickets, the response times out. The changes do take effect properly, it just takes too long. This is new behavior, since [#2502]

Related

Pastebin: 51cc8cf181b24b4f1a286ddf
Tickets: #2502
Tickets: #6203
Tickets: #6374
Tickets: #6385
Tickets: #6414

Discussion

<< < 1 2 (Page 2 of 2)
  • Cory Johns
    Cory Johns
    2013-06-17

    The change to background task seems fine, and I'm merging it, but we do need some more info on why it's taking so long. I found this stats record in the logs, showing it take over 4 minutes and make over 185k mongo calls, which is way over the top.

    What research did you do to determine what's causing these updates to taking so long? Can you please post the results of your research here. Can you please see if there's a way to reduce the number of mongo calls made?

    At a quick glance, I expect Globals.filtered_by_subscription could be refactored to a single mongo query instead of more than one per user per ticket by replacing the classmethod subscribed call with an instance method that checks the Mailbox's properties instead of re-querying mongo needlessly. I'm not certain if that's the main source of queries, but it's definitely one that could be improved.

     
    Last edit: Cory Johns 2013-06-17
  • Closed #377. je/42cc_6203a

    We've refactored filtered_by_subscription to a single query.

    Here's some timings:

    Before:

    0.234148979187
    0.1740899086
    0.166922807693
    0.267369031906
    

    After:

    0.00868606567383
    0.0089738368988
    0.00773596763611
    0.00699090957642
    

    Also, you can see profiler logs here: before, after.

    As you can see, there are still a lot of mongo calls on discussion's post, approve and ticket's commit, but I think they are not relevant to performance degradation, because they was present before [#2502]. So, I think, main source of troubles was in filtered_by_subscription (especially, when there are many users subscribed to many different tickets).

     

    Related

    Pastebin: 51caecacbcf63a124024f580
    Pastebin: 51caecc6c43143165e8a2410
    Tickets: #2502

  • Cory Johns
    Cory Johns
    2013-06-26

    • status: code-review --> closed
    • Milestone: forge-backlog --> forge-jun-28
     
<< < 1 2 (Page 2 of 2)


Anonymous


Cancel   Add attachments