Opened 14 years ago

Closed 13 years ago

#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" %>

Attachments (1)

legend.aspx (23.7 KB ) - added by sreckol 14 years ago.

Download all attachments as: .zip

Change History (6)

by sreckol, 14 years ago

Attachment: legend.aspx added

comment:1 by sreckol, 14 years ago

Component: AJAX ViewerWeb API

comment:2 by tomfukushima, 14 years ago

Owner: set to liuar

comment:3 by jng, 14 years ago

Cc: jng added

comment:4 by jng, 13 years ago

Owner: changed from liuar to jng

comment:5 by jng, 13 years ago

Resolution: fixed
Status: newclosed

Fixed 2.2 (r5894) Fixed trunk (r5895)

I have not applied the page directive changes. If you can cite some performance data proving solid performance gains with these directive changes, then re-open the ticket and I'll look at getting that in as well.

Note: See TracTickets for help on using tickets.