|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
asp.net 2.0 treeview control - very slowdisplays extremely slowly in Internet Explorer. I've been checking my work in IE 6 and 7 beta2 and in Firefox 1.5. Firefox is fast enough, but IE is unreasonably slow. My page builds the tree in code. It adds four top level items. Each of those gets 10 children, and each of those children gets 20 children. (So there are 844 individual nodes). The code itself runs very quickly. It is just the rendering of the treeview to the browser that seems to be the problem. I've done a few tests whch, pretty much, convince me that it is not the code that I use to build the tree. If I remove the treeview from the page's controls collection, the page loads very quickly, but, of course, nothing ever gets displayed. If I replace the treeview with a menu object, I can use almost identical code to build the menu, which displays very quickly. Does anyone have any suggestions? For what it's worth, I've just made some changes to my code so that the child
(and grandchild) nodes are populated on demand. This did not really help IE, and if anything, it slowed down Firefox (but that might just be my imagination). Show quoteHide quote "Doug Salomon" wrote: > I've been playing around with the treeview control, and I'm finding that it > displays extremely slowly in Internet Explorer. I've been checking my work in > IE 6 and 7 beta2 and in Firefox 1.5. Firefox is fast enough, but IE is > unreasonably slow. > > My page builds the tree in code. It adds four top level items. Each of those > gets 10 children, and each of those children gets 20 children. (So there are > 844 individual nodes). > > The code itself runs very quickly. It is just the rendering of the treeview > to the browser that seems to be the problem. > > I've done a few tests whch, pretty much, convince me that it is not the code > that I use to build the tree. > > If I remove the treeview from the page's controls collection, the page loads > very quickly, but, of course, nothing ever gets displayed. > > If I replace the treeview with a menu object, I can use almost identical > code to build the menu, which displays very quickly. > > Does anyone have any suggestions? More...
I've made some more changes, which are a bit more hopeful. In the post above, where I said that I was using populateondemand, I was probably doing it in a silly way (but in my defence, I was just following the steps outlined in some tutorial). Basically, I had three functions : populateTopLevelNodes, populateChildNodes, populateGrandChildNodes. On load, I ran populateTopLevelNodes. Then in the TreeView1_TreeNodePopulate event handler, I populated everything else. So, I would check the type of node, and populate it accordingly (using populateChildNodes or populateGrandChildNodes). As I mentioned, this was not particularly useful. I changed things so that the populateChildNodes and populateGrandChildNodes now get called from the TreeView1_SelectedNodeChanged event handler. This is a bit faster, although I am getting some errors when I click on the child nodes. My problem with this is that it complicates my code and just seems unnecessary. I'd still like to know if someone has a better solution. Thanks, Doug Show quoteHide quote "Doug Salomon" wrote: > For what it's worth, I've just made some changes to my code so that the child > (and grandchild) nodes are populated on demand. > > This did not really help IE, and if anything, it slowed down Firefox (but > that might just be my imagination). > > "Doug Salomon" wrote: > > > I've been playing around with the treeview control, and I'm finding that it > > displays extremely slowly in Internet Explorer. I've been checking my work in > > IE 6 and 7 beta2 and in Firefox 1.5. Firefox is fast enough, but IE is > > unreasonably slow. > > > > My page builds the tree in code. It adds four top level items. Each of those > > gets 10 children, and each of those children gets 20 children. (So there are > > 844 individual nodes). > > > > The code itself runs very quickly. It is just the rendering of the treeview > > to the browser that seems to be the problem. > > > > I've done a few tests whch, pretty much, convince me that it is not the code > > that I use to build the tree. > > > > If I remove the treeview from the page's controls collection, the page loads > > very quickly, but, of course, nothing ever gets displayed. > > > > If I replace the treeview with a menu object, I can use almost identical > > code to build the menu, which displays very quickly. > > > > Does anyone have any suggestions? Hi
I've been having the same problem. IE very slow, Opera and Firefox pretty quick. I don't think it's your code. I was placing my treeview in a table. If I remove the table and replace with a <div> it works just as quickly as Opera and Firefox. Let me know if this works for you. Cheers Wayne I'm having truoble believing this, but it looks like you're right!
If I plop the treeview into a table, IE slows down. If I remove it from the table, IE speeds up. Its still not as fast as Firefox, but I think I can make this work well enough now. thanks, Doug Show quoteHide quote "WayneB" wrote: > Hi > > I've been having the same problem. IE very slow, Opera and Firefox pretty > quick. I don't think it's your code. > > I was placing my treeview in a table. If I remove the table and replace with > a <div> it works just as quickly as Opera and Firefox. Let me know if this > works for you. > > Cheers > > Wayne Oh well, that sense of euphoria didn't last.
It actually looks like the tree isstill as slow as ever, only when it is not contained within a table we actually get the pleasure of watching it get built. (When it is within a table, that outer table does not get rendered until the contents - the treeview itself - are rendered, s it seems slower.) This would actually be ok, except that mousing over the treeview while it is being built causes javascript errors. (Once again, this is with IE only.) I've tried to disable the treeview until it is fully built, but that does not seem to work. Anyone have any ideas here? Doug Show quoteHide quote "Doug Salomon" wrote: > > I'm having truoble believing this, but it looks like you're right! > > If I plop the treeview into a table, IE slows down. If I remove it from the > table, IE speeds up. > > Its still not as fast as Firefox, but I think I can make this work well > enough now. > > thanks, > Doug > > "WayneB" wrote: > > > Hi > > > > I've been having the same problem. IE very slow, Opera and Firefox pretty > > quick. I don't think it's your code. > > > > I was placing my treeview in a table. If I remove the table and replace with > > a <div> it works just as quickly as Opera and Firefox. Let me know if this > > works for you. > > > > Cheers > > > > Wayne Hi Doug
I wish I could offer some help, but I'm experiencing the exact same problem as yourself. If I display the data that builds the tree in a 'Response.Write' way, the data is displayed in less than a second. Build a treeview with it, and it takes over 30 seconds! We're trying to convert a desktop system to a web app, and it seems that it just can't be done if you're dealing with too much data. Seems a shame because I thought that was the whole point! If I uncover any ground breaking discoveries, I'll let you know, but I've now given up with it. Looks like desktop power is here to stay! Regards, Mike Show quoteHide quote "Doug Salomon" wrote: > Oh well, that sense of euphoria didn't last. > > It actually looks like the tree isstill as slow as ever, only when it is not > contained within a table we actually get the pleasure of watching it get > built. (When it is within a table, that outer table does not get rendered > until the contents - the treeview itself - are rendered, s it seems slower.) > > This would actually be ok, except that mousing over the treeview while it is > being built causes javascript errors. (Once again, this is with IE only.) > > I've tried to disable the treeview until it is fully built, but that does > not seem to work. > > Anyone have any ideas here? > > Doug > > "Doug Salomon" wrote: > > > > > I'm having truoble believing this, but it looks like you're right! > > > > If I plop the treeview into a table, IE slows down. If I remove it from the > > table, IE speeds up. > > > > Its still not as fast as Firefox, but I think I can make this work well > > enough now. > > > > thanks, > > Doug > > > > "WayneB" wrote: > > > > > Hi > > > > > > I've been having the same problem. IE very slow, Opera and Firefox pretty > > > quick. I don't think it's your code. > > > > > > I was placing my treeview in a table. If I remove the table and replace with > > > a <div> it works just as quickly as Opera and Firefox. Let me know if this > > > works for you. > > > > > > Cheers > > > > > > Wayne Hi Mike,
Thanks for sharing the pain. :) Doug Show quoteHide quote "Mike Wilkinson" wrote: > Hi Doug > > I wish I could offer some help, but I'm experiencing the exact same problem > as yourself. If I display the data that builds the tree in a > 'Response.Write' way, the data is displayed in less than a second. Build a > treeview with it, and it takes over 30 seconds! We're trying to convert a > desktop system to a web app, and it seems that it just can't be done if > you're dealing with too much data. Seems a shame because I thought that was > the whole point! > > If I uncover any ground breaking discoveries, I'll let you know, but I've > now given up with it. Looks like desktop power is here to stay! > > Regards, > Mike > > "Doug Salomon" wrote: > > > Oh well, that sense of euphoria didn't last. > > > > It actually looks like the tree isstill as slow as ever, only when it is not > > contained within a table we actually get the pleasure of watching it get > > built. (When it is within a table, that outer table does not get rendered > > until the contents - the treeview itself - are rendered, s it seems slower.) > > > > This would actually be ok, except that mousing over the treeview while it is > > being built causes javascript errors. (Once again, this is with IE only.) > > > > I've tried to disable the treeview until it is fully built, but that does > > not seem to work. > > > > Anyone have any ideas here? > > > > Doug > > > > "Doug Salomon" wrote: > > > > > > > > I'm having truoble believing this, but it looks like you're right! > > > > > > If I plop the treeview into a table, IE slows down. If I remove it from the > > > table, IE speeds up. > > > > > > Its still not as fast as Firefox, but I think I can make this work well > > > enough now. > > > > > > thanks, > > > Doug > > > > > > "WayneB" wrote: > > > > > > > Hi > > > > > > > > I've been having the same problem. IE very slow, Opera and Firefox pretty > > > > quick. I don't think it's your code. > > > > > > > > I was placing my treeview in a table. If I remove the table and replace with > > > > a <div> it works just as quickly as Opera and Firefox. Let me know if this > > > > works for you. > > > > > > > > Cheers > > > > > > > > Wayne I had the same problem with the ASP.NET 2.0 menu control. Very fast in
firefox - unacceptable in IE. I posted here - and never got a fix. Turns out the problem was the number of levels the menu went to. Three levels work fine, but four or more killed everything. I had to completely rewrite everything I had done - using 8 different XML sitemaps instead of one - and choosing which sitemap to load based on the users login . Had to completely rework my SQL DB tables that are used to build my sitemaps. Ugh!! Show quoteHide quote "Doug Salomon" wrote: > Hi Mike, > > Thanks for sharing the pain. :) > > Doug > > "Mike Wilkinson" wrote: > > > Hi Doug > > > > I wish I could offer some help, but I'm experiencing the exact same problem > > as yourself. If I display the data that builds the tree in a > > 'Response.Write' way, the data is displayed in less than a second. Build a > > treeview with it, and it takes over 30 seconds! We're trying to convert a > > desktop system to a web app, and it seems that it just can't be done if > > you're dealing with too much data. Seems a shame because I thought that was > > the whole point! > > > > If I uncover any ground breaking discoveries, I'll let you know, but I've > > now given up with it. Looks like desktop power is here to stay! > > > > Regards, > > Mike > > > > "Doug Salomon" wrote: > > > > > Oh well, that sense of euphoria didn't last. > > > > > > It actually looks like the tree isstill as slow as ever, only when it is not > > > contained within a table we actually get the pleasure of watching it get > > > built. (When it is within a table, that outer table does not get rendered > > > until the contents - the treeview itself - are rendered, s it seems slower.) > > > > > > This would actually be ok, except that mousing over the treeview while it is > > > being built causes javascript errors. (Once again, this is with IE only.) > > > > > > I've tried to disable the treeview until it is fully built, but that does > > > not seem to work. > > > > > > Anyone have any ideas here? > > > > > > Doug > > > > > > "Doug Salomon" wrote: > > > > > > > > > > > I'm having truoble believing this, but it looks like you're right! > > > > > > > > If I plop the treeview into a table, IE slows down. If I remove it from the > > > > table, IE speeds up. > > > > > > > > Its still not as fast as Firefox, but I think I can make this work well > > > > enough now. > > > > > > > > thanks, > > > > Doug > > > > > > > > "WayneB" wrote: > > > > > > > > > Hi > > > > > > > > > > I've been having the same problem. IE very slow, Opera and Firefox pretty > > > > > quick. I don't think it's your code. > > > > > > > > > > I was placing my treeview in a table. If I remove the table and replace with > > > > > a <div> it works just as quickly as Opera and Firefox. Let me know if this > > > > > works for you. > > > > > > > > > > Cheers > > > > > > > > > > Wayne
Other interesting topics
DataGrid not responding to Update/Cancel click
detailsview, inserting new record and request.querystring Get data, make textBoxes, edit values, and re-save to database. Simple? A question about Repeater control Datagrid soes not page nor edits Web User Control Any Help on TabStrip Control?? Flickering imagebutton with smartnavigation on EnableViewState=False creates problems with Visible & Enabled disabling back button of window |
|||||||||||||||||||||||