On Thu, 2004-03-04 at 23:26, Rob Shortt wrote: > Maybe the speed of having a smaller faster tvguide view is worth a hit > for each time you want to display a programs info. I would like to try > improving what we have now before going the window.open() route. > > Jason Tackaberry has some ideas for speeding up the guide. Jason?
I second Rob's opinion that window.open()'d popups aren't as good, especially with Mozilla-based browsers on linux, where opening new windows still seems extremely expensive. I had a quick look through the tvguide code a couple weeks ago when I noticed the popups weren't working at all (or rather, they were popping up at the bottom of the page). Indeed this sort of thing could quite effectively be optimized. Dynamically creating the popup is the way to go, IMO, but I'd much rather use the DOM than document.write() a bunch of stuff. Constructing complex things (like tables and such) using the DOM is tedious, but there's always innerHTML (though I'm not sure about Konqueror's support for innerHTML). I think the best way is to keep the program information in an array that gets constructed out of the tv guide data, e.g. prog_data = { "C201cjon.zap2it.com:1078518600.0": // progid [ 1078462800.0, // start time 1078464600.0, // end time "Three's Company", // Program title "Janet hires Jack to work in the flower shop", // desc ... whatever else is needed ... ], ... more programs ... }; This should be served as a separate file, and in fact could be dynamically named and served with the appropriate HTTP headers to take advantage of client-side caching. So for example, it could be called progdata-1078462800-1078470000.js. Then if the user returns to this block of time in the guide, loading will be much quicker. In fact, thinking aloud here, we could just construct the entire guide with the DOM, as well as the popups. Hmmm ... /me goes away to mock something up ... Check out http://people.auc.ca/tack/guide.html Program data is stored in progdata-1078462800-1078470000.js which, as explained above, would be dynamically generated by the server based on the current guide info. The Javascript in guide.html constructs a guide based on the data in the progdata file. You can see it gets a little cumbersome to do it this way, but it's not terribly bad once you get your mind wrapped around it. The Javascript in guide.html should be moved to a separate js file. This would also be cached by the client. So the result is fairly efficient. The code here isn't pretty; it's just meant to serve as an example of what I'm talking about it. It works on Gecko and IE, but I've not tested it elsewhere. It should work everywhere there's sufficient DOM support, including Opera, Konq, and Safari. Comments interspersed throughout the code. Unfortunately I don't have enough time to volunteer to do this up The Right Way, but hopefully my ideas are of some use. Cheers, Jason. -- Jason Tackaberry :: [EMAIL PROTECTED] :: 705-949-2301 x330 Academic Computing Support Specialist Information Technology Services Algoma University College :: www.auc.ca ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel