Jason Tackaberry wrote:
Hi,

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.

Yes, its nasty with a large guide.


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:

Such is the beauty of open source.


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. :)

Ok, stop offending me! ;) The guide achieved my goals at the time and most of it was written over 1.5 years ago as a python newbie. There has been little motivation to improve it. Thank you for doing so.



     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.

It works much better now.


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.

I'm running Mozilla, and I've applied your patch to CVS main branch. There are a few things I need to fix up and I'll commit this in the evening.


-Rob


------------------------------------------------------- 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

Reply via email to