#330: Lazy evaluation of req.chrome
--------------------------+--------------------
  Reporter:  peter        |      Owner:  nobody
      Type:  enhancement  |     Status:  new
  Priority:  minor        |  Milestone:
 Component:  dashboard    |    Version:
Resolution:               |   Keywords:
--------------------------+--------------------

Comment (by peter):

 Replying to [comment:2 olemis]:
 > Replying to [ticket:330 peter]:
 > > For optimal performance req.chrome should be evaluated only if
 necessary.
 > > This currently violated on multiple places in request handlers,
 filters and mainly by trachacks:TracThemeEngine plugin.
 > >
 >
 > Could you please mention where is it exactly that
 trachacks:ThemeEnginePlugin violates lazy instantiation of `req.chrome` ?
 >
 > [...]
 > > However there has been no investigation on trachacks:TracThemeEngine
 yet. Until this is fixed there is no benefits in fixing BH code at all.
 >
 > I'm the maintainer of that plugin . I've not noticed something like that
 , so I ask : What's wrong exactly ?

 When the plugin is installed and active it's post_process_request() will
 be invoked for every  request. AFAICT there is nothing in that code that
 would differentiate requests (API vs UI requests) so add_stylesheet() will
 be called for all of them which then calls add_link() that evaluates
 req.chrome.

 There might be other cases as well (maybe in Trac itself also) but this is
 the one I stumbled upon when I was investigating why does my solution for
 lazy whitelabeling have no effect at all.

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/330#comment:3>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Reply via email to