A
Aidan Marcuss
I am seeing significant performance problems with the TreeView (from
the Microsoft.Web.UI.WebControls namespace) when trying to data bind it
on the server side. I set the TreeNodeSrc property and the
TreeNodeTypeSrc property and then call the DataBind() method. I am
setting each of these properties to a string of XML.
As the payload grows, this becomes terribly slow. This is all server
side.
I've found that this may have to do with the way the control interprets
the values of the TreeNodeSrc & TreeNodeTypeSrc properties. According
to the documentation, these properties can be set to one of three
values: "A value that indicates the URL of an XML file, System.String,
or XML data island containing TreeNode elements.". It would appear that
they way the DataBind method interrupts these values is by first
attempting to data bind to the results of a web request to a URL equal
to the value of the property. It would then appear to try and interpret
it is a string of XML. This doesn't make much sense, because, the
string of XML can be very long and it has to send out a very long web
request to try and data bind to. If you look at your web log, you'll
see requests like:
21:44:15 127.0.0.1 GET /< 404
This call obviously fails. It would appear to then properly treat it as
a string. I believe these requests (one for TreeNodeTypeSrc &
TreeNodeSrc) play a significant part in the slow down.
Does anyone have any idea about how to control this behavior?
the Microsoft.Web.UI.WebControls namespace) when trying to data bind it
on the server side. I set the TreeNodeSrc property and the
TreeNodeTypeSrc property and then call the DataBind() method. I am
setting each of these properties to a string of XML.
As the payload grows, this becomes terribly slow. This is all server
side.
I've found that this may have to do with the way the control interprets
the values of the TreeNodeSrc & TreeNodeTypeSrc properties. According
to the documentation, these properties can be set to one of three
values: "A value that indicates the URL of an XML file, System.String,
or XML data island containing TreeNode elements.". It would appear that
they way the DataBind method interrupts these values is by first
attempting to data bind to the results of a web request to a URL equal
to the value of the property. It would then appear to try and interpret
it is a string of XML. This doesn't make much sense, because, the
string of XML can be very long and it has to send out a very long web
request to try and data bind to. If you look at your web log, you'll
see requests like:
21:44:15 127.0.0.1 GET /< 404
This call obviously fails. It would appear to then properly treat it as
a string. I believe these requests (one for TreeNodeTypeSrc &
TreeNodeSrc) play a significant part in the slow down.
Does anyone have any idea about how to control this behavior?