Ticket #1451 (closed defect: fixed)
Posible performance issue when parsing strings (Using StringBuilder instead string concatenate)
| Reported by: | sreckol | Owned by: | jng |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | Web API | Version: | 2.2.0 |
| Severity: | major | Keywords: | StringBuilder string concatenate performance |
| Cc: | jng | External ID: |
Description
I have been working a lot on improving Mapguide performance, especially at WEB server AJAX Viewer.
We are working with ASP.NET and IIS 7.5 on WIN server 2008.
With a lot of reading and testing I discover one big performance issue in legend.aspx.
Using StringBuilder?.Apend instead of string concatenate (output = output + ...) improved performance while loading this page for 1 second (at least for 4 times)!
For loading this page before it uses 1.3s, after using StringBuilder? it uses only 0.3s …
Because legend.aspx is called at every page refresh, this is probably quite big performance issue …
Probably the same issue is at legend.php and legend.jsp and also at some other files, where string concatenate was used.
Probably this is also memory issue at IIS, Apache, Tomcat webservers ...
Second quite big performance issue at ASP.NET (for all aspx pages in mapviewernet folder) is setting Extra options at Page directive or set it globally in web.config.
Example for page direcive:
Before:
<%@ Page language="c#" %>
After:
<%@ Page language="c#" EnableViewState?="false" EnableSessionState?="False" ValidateRequest?="false" Buffer="true" %>

