|
thund3rstruck wrote: slow even after logically partitioning pages into user controls
User controls make things easy to code, they don't make them fast.
thund3rstruck wrote: I have replaced several server controls with their HTML/JS counterparts (replacing GridViews/DataLists with tables & using Javascript to handle sorting, parsing, etc).
Well, this is just reinventing the wheel.
thund3rstruck wrote: I think I'm going to have to do some kind of transformation of the data to XML so javascript can do the paging
you're wrong. Really, paging should happen from the DB, otherwise you're asking for data you don't show, which is a major bottleneck, esp as your DB grows.
thund3rstruck wrote: My question is this, if I execute a SQL query that returns 1000 rows and I intend on displaying 10 rows at a time in a table with a pager
If you do this, you're being incredibly inefficient.
thund3rstruck wrote: do I have to send the whole xml file to each browser client
You should avoid sending data you don't want to display. You should avoid even asking the DB for it.
thund3rstruck wrote: wouldn't this kind of contradict the whole concept of performance tuning and optimization?
Yes.
thund3rstruck wrote: Can I expect a significant improvement in ASP.NET application responsiveness by replacing all the built-in server controls with HTML/JavaScript controls?
No. You're taking their HTML and Javascript and replacing it with your own. They tested theirs more.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Did you just delete a "Help" somewhere?
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
VuNic wrote: OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
ROTFL. Did I say that ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
lol smoking guns..
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
[quote]No. You're taking their HTML and Javascript and replacing it with your own. They tested theirs more[/quote]
Can you provide some data that supports this claim? It reads very clearly on MSDN - "The HTTP protocol is stateless; however, server controls provide a rich programming model that manages state between page requests by using view state. Server controls require a fixed amount of processing to establish the control and all of its child controls. This makes server controls relatively expensive compared to HTML controls......"
http://msdn.microsoft.com/en-us/library/ms998549.aspx#scalenetchapt06_topic12[^]
I have had several discussions regarding this (even earlier this month with a Microsoft Consultant we have on staff for incentive projects) and I have been told time and time again that the .NET server data bound controls don't scale well and aren't ready for real high volume, high impact, production web solutions out of the box with the controls provided in the platform. These problem solutions use .NET databound controls and even with caching, they all perform poorly compared to our PHP and JSP solutions (in terms of page per second, TTFB, and TTLB).
Our stress test benchmarks seem to corroborate this; in an empty page with nothing but an ASP.NET TreeView control wired to an ICollection (from a database) performs several seconds slower than a JavaScript-based DHTML tree control serving the same data when the stress thread reaches 25+ concurrent threads.
|
|
|
|
|
thund3rstruck wrote: The HTTP protocol is stateless; however, server controls provide a rich programming model that manages state between page requests by using view state
Yes, this is true. But, you can turn viewstate off, you can use repeaters ( my favourite control when it comes to creating lightweight solutions that scale well ), etc. ASP.NET does not scale well when people use it blindly, but, what does ?
Is your site bigger than CP ? Does it have more users than CP ? CP is written in ASP.NET, using server controls. However, again, the repeater is your friend if you want to have control over how well things behave. And, for you to talk about trying to scale well, and still ask about getting all of your data from the server, and then sending it all to a client, is ridiculous. viewstate is rarely going to be as big as the XML you're talking about sending, so you've traded one problem for another, as well as the addition time it takes to get that data from the database. You need to write your own paging control, and then write database code that returns the number of pages and the data in the current page, so you can render it without sending needless data to the client or requesting it from the DB. That's your two biggest issues of scale - the amount of data you ask for and the size of the pages you send, and in both cases you were advocating rolling out a solution that replicated the issues that could cause scaling problems with ASP.NET controls. You can instead use a repeater, write your own paging code, and solve the problems without throwing out server controls completely.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
[quote]Is your site bigger than CP ? Does it have more users than CP ? CP is written in ASP.NET, using server controls.[/quote]
No, these intranet sites are no where near as big codeproject and they max out around 4000 concurrent connections. My original question wasn't legitimate as I didn't understand how JavaScript partial postback (AJAX) works but after reading some more and talking to others I now understand that JavaScript can query, parse, etc xml from a remote resource (usually generated by a script url) and the xml that's transferred to the browser is send as a result of the database logic in your query script.
I'm at a loss here in determining why our sites are performing so poorly. As I stated before, I have reduced the scope of my stress testing to a single TreeView that's populated from a SQL Query and even with nothing but a treeview on the page I still get TTFB values of approx 6000ms and TTLB of 30000ms. If I replace the ASP.NET tree with a DHTML tree, I get a TTLB that's reduced by a few seconds but even that is unacceptably slow. So for a single page, regardless of the load (and I've tested up to 50 concurrent threads) it takes almost 6 seconds to send the first byte to the users browser and 30 more seconds to send the last byte.
To this point I have enabled caching, reduced the page size, enabled http compression, disabled viewstate and session state, and ensured the pages are batch compiled. I suppose that last thing to do is to run some analysis on the SQL queries used to populate the treeView, perhaps they're the problem (but I'm using NHibernate as the data layer, which is supposed to already be optimized).
Thanks guys, I'm going to continue this testing (I'm using the old Microsoft Web Application Stress Tool; is there a more modern, free stress testing tool?) and I'll update this thread if I get this page to respond in the way our business rules dictate (no longer than 3 seconds to TTFB and no longer than 6 seconds to TTLB).
Thanks
|
|
|
|
|
I m working on a website. The treeview is necessity for my application. Basic treeview i can use.but i want do some attractive plzz guys help me.
|
|
|
|
|
If you are able to use third party control toolkit, I would suggest you to have Infragistics NetAdvantage 2007 controls.
You can have the best looking tree view in your application in website.
SAJAN A PILLAI
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
can u send the link of that site and some example of that page. plzzz
|
|
|
|
|
www.infragistics.com/ [^]
Here is the link....
Download it may take some time.....After installation you can have a look at the samples provided. and easily go for making a treeview...
One more question...? If the application you are building is for any client or other company purpose, you cannot go for these Third party controls. They wont be allowing you to install these on their server to support the application.
If its for personal use, You can go for that and even better GUI providing controls like RADControls are also available here...
www.telerik.com/products/aspnet-ajax.aspx [^]
SAJAN A PILLAI
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
Ya I check that website before only i m trying to tell that type of graphics i need. But I m using some person work for this web site. like demonstrate a website one company. maybe they will use or not so that i m searching free 3rd party tool or any program. plzzz help me.
|
|
|
|
|
If you want fancy controls, you should search CP. your other options are typically to pay for them, or write your own.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I have an ASP .NET page with some text boxes, where I set the javascript events onfocus and onblur to change the backgroundColor, so the code is something like what's below:
function setBackgroundColor(elementID, color)
{
var control = document.getElementById(elementID);
control.style.backgroundColor = color;
}
The problem is, as soon as this happens, the borderStyle also changes from the original flat/solid borderStyle to one that's 3D (not sure which one though). Does anyone know why these two backgroundColor and borderStyle properties are tied to each other and how I'd go about only changing just the backgroundColor?
|
|
|
|
|
The idea is that the browser uses the underlying OS's rendering capabilities to standard form controls (like buttons or text boxes).
As soon as you change attributes/properties/styles that the OS cannot render anymore, the browser switches from an OS rendered control to an ownerdrawn control.
Happens e.g. inside Google applications quite often, too.
You could set the border always explicitely to avoid the "flipping" you described.
|
|
|
|
|
Interesting, thanks for the info. I tried setting the borderStyle to solid, and then it changed the border outline to a different color (black) than what the OS renders (I guess), which is something like a light blue-ish color. In the end, I just said "screw it, 3D border style it is", since it seemed to look alright.
|
|
|
|
|
I'm reading an xml file that is stored on a webserver that has SSL.
But I get an error " '>' is an unexpected token. The expected token is '"' or '''. Line 3, position 46."
It works fine if the xml file is on a webserver that doesn't have SSL.
I'm using
XmlDocument.Load(url)
Is there some other way that I can try?
Edit.
If I was unclear, the xml file is on a different server than my web application.
modified on Friday, December 12, 2008 2:40 PM
|
|
|
|
|
Sounds to me that it is not a matter of SSL/non-SSL but more to the content of the XML document.
Are you sure that you test with the _same_ XML documents?
|
|
|
|
|
Yes, I'm sure that it's the same file.
|
|
|
|
|
Hi Guys,
I've following problem: I have a grid view which gets data from a SQL server through a DataSet and an ObjectDataSource. The DataSet holds queries to many tables. Now I try to show all the data in the grid view.
When I try to show the data through a DDL, I get following error:
'DDLStatusItem' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
<asp:TemplateField HeaderText="Status" SortExpression="Status">
<ItemTemplate>
<asp:DropDownList ID="DDLStatusItem" runat="server" OnInit="DDLStatusItem_OnInit" DataSourceID="ODSFilterGridByStatus" DataTextField="Beschreibung" DataValueField="StatusId" SelectedIndex='<%# Eval("StatusId") %>' SelectedValue='<%# Bind("Status") %>'>
</asp:DropDownList>
The ODS of the ddl is different from the gridview one. When I try to access the GV DataItems "StatusId" and "Status", it dosen't break.
Does somebody know, what's my problem is?
Have a nice weekend!
|
|
|
|
|
I have a problem with disabling view state. if i set enableviewstate=false at page level that consists of grid.
when i select any record in the grid which is empty its throwing an exception Specified argument was out of the range of valid values.
Parameter name: ItemHierarchicalIndex.
Grid is working fine if is set enableviewstate=false to grid level.
is there any solution for this. I am using Rad grid.
cheers
chandu
|
|
|
|
|
Sounds like Rad Grid is the issue, so ask them.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello All,
This may be a simple enough questions but I cannot seem to make them work for me, therefore I am looking for any breadcrumbs that you guys can offer.
I have a simple DropDownList that is bound to an SQL DataSource that just pulls users names from a table. No problem there. What I need to do in certain situations are the following:
A - Add a new item to the list (No User)
B - Have that new item first in the list as being selected.
I have tried adding the .ADD method to the DataBound event, and it appears to be run but that value is not in the list after the page loads. Additionally I cannot make any other items in the list selected (instead of USERA being displayed I would like USERC displayed upon load).
Any assistance will be appreciated.
|
|
|
|
|
You can do one thing
when you want ot add user at that time don't bind it from datasource just add user using .ADD else bind it to datasource.
if you want ot make it more custom read each item from database one by one and add it.
Cheers!!
Brij
|
|
|
|
|
I thought I would have to code it but I wasn't sure if it could be done without the coding.
So that answers that, but how do I make a specific one selected?
|
|
|
|