Hi, I'm applying this patch to the HEAD branch, but I've also added it to my personal installation and the results are impressive. I'm going to applying this patch to 1.5.x versions of the Debian package going forward.
I can't add it to the 1.5 branch unless Dischi approves though... Very nice work, Aubin On Tue, Aug 10, 2004 at 01:11:45AM -0400, Jason Tackaberry wrote: > Hi, > > I'm finding the current guide in the web interface rather useless. It > takes 35-40 seconds to get the guide (with a few hundred channels) to > display on my browser; this includes about 30 seconds on the server, and > 10 seconds on the client to render the page. Obviously this is > unacceptable. > > I reserve the right to use words like "useless" and "unacceptable" > because I'm attaching a fix. :) Back in March there was an exchange on > this list about how to improve the guide for the web interface. This > patch implements the ideas I mocked up as described here: > > http://sourceforge.net/mailarchive/message.php?msg_id=7387214 > > The web interface code is scary. I don't mean to insult anyone, so I'll > give the author the benefit of the doubt and assume he scratched > something quickly together without giving it much thought. :) > > The obscene performance of the guide can be attributed to two things: > > 1. Server side: egregious string concatenation. Python is slow at > concatenating strings when they grow very big. I learned this > quickly with my bmovl2 work. An easy and significant > performance fix is to use a list, and string.join(list, "\n") > when you're done. > 2. Client side: A unique hidden div was created for every program > in the displayed guide. There are clever adjectives I could use > to describe this. I'll leave them to your imagination. Suffice > it to say the browser takes a fair bit of time to churn through > all this code. > > Fixing #1 realized significant improvement: from 40 seconds to 7 > seconds. Unfortunately the HTMLResource stuff doesn't seem to allow for > this very well. Fixing this The Right Way would involve reworking the > underlying code. I didn't want to sign up for that. :) Instead I just > removed the tableRowOpen/tableRowClose/tableCell stuff on the inner loop > and hard-coded the HTML, adding the lines to the array. The end > justifies the means. > > Fixing #2 was relatively straight forward, and it's detailed in my email > at the URL above, so I won't repeat it here. Now when you click on a > grid cell, the window pops up saying "Fetching data from server" and it > loads proginfo.rpy from the server, which then dynamically updates the > popup's contents via Javascript. > > Fix #2 also applied to genre.rpy. > > I also fixed a couple other bugs I ran into. edit_favorite.rpy was > generating a JS error because some script code wasn't separated by a > newline. There was also some rendering glitches in that page because > there was a missing hack. > > This patch is against 1.5.0, but it applies to cvs. Code tested in > Firefox and IE 6.0. > > Cheers, > Jason. ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel
