> This isn't a review, but I'm curious how you've established that this
> is faster

I haven't actually established that it is faster; I would like to do that based 
on timings on actual production data on one of the test servers.  In practice 
it's not so much the speed of producing these listings that we care about, as 
it is the speed of producing specifically the Ubuntu listings.


> Also, we have a new template engine in the
> pipeline :- we probably don't want a lot of procedural code doing
> template-work (or we want all our code doing that).

This is a bit of a special case given the enormous amounts of data that show up 
in the page.  (There are good reasons for doing it this way, so "just batch it" 
is a poor plan B).

If the new template engine turns out to be faster than straight-through python 
code, then we should probably scuttle this branch.


> Uhm for generating big texts in python, do this:
> buffer = []
> for <blah>:
>    buffer.append(somestring)
> ...
> return ''.join(buffer)
> 
> This isn't as efficient as a pure chunking end-to-end implementation,
> but it is the next best thing.

I do that for smaller chunks.  For the page as a whole however I think the 
templating engine is likely to be better tuned.  With literally thousands of 
lines on a page, the ability to start sending HTML before the full list has 
been rendered could be a real plus.


> Lastly, you might like to nab Gary or someone from foundations to talk
> about the implications of canonical_url returning relative paths :
> we've got some stuff changing in that area just recently.

Something I didn't make clear in the cover letter: it's only a very specific 
use-case of canonical_url, on one kind of page and for one kind of object that 
it replaces.  The tests should expose any changes that break the equivalence to 
canonical_url.


Jeroen
-- 
https://code.launchpad.net/~jtv/launchpad/templates-listing/+merge/35185
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~jtv/launchpad/templates-listing into lp:launchpad/devel.

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to