[Buildbot-commits] [Buildbot] #2246: buildbot.status.builder.BuilderStatus uses slow LRU implementation

Buildbot nobody at buildbot.net
Sun Mar 18 00:35:26 UTC 2012


#2246: buildbot.status.builder.BuilderStatus uses slow LRU implementation
------------------------+--------------------
Reporter:  szager       |       Owner:
    Type:  defect       |      Status:  new
Priority:  critical     |   Milestone:  0.8.7
 Version:  0.8.6        |  Resolution:
Keywords:  performance  |
------------------------+--------------------
Changes (by dustin):

 * keywords:   => performance
 * milestone:  undecided => 0.8.7


Comment:

 szager - I'm curious why you're seeing so many hits to that method in a
 second.  My guess is that it's due to the web status being heavily used?

 There's a significant advantage to using existing, well-tested code
 (AsyncLRUCache) for this purpose.  Deferreds are well-tested and
 performant, so I don't think avoiding them for performance reasons is ok
 without some hard data.

 That said, `getBuild` is called a *lot*, in a synchronous fashion, so I
 expect that making it async will involve a lot of work -- work on
 untested, bad code.

 The async implementation is based on
 http://code.activestate.com/recipes/498245-lru-and-lfu-cache-decorators -
 perhaps you could add (and test and document) a synchronous implementation
 in `master/buildbot/util/lru.py` and use that?

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2246#comment:4>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list