Ticket #1451 (closed defect: fixed)

Opened 20 months ago

Last modified 12 months ago

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

legend.aspx Download (23.7 KB) - added by sreckol 20 months ago.

Change History

Changed 20 months ago by sreckol

Changed 20 months ago by sreckol

  • component changed from AJAX Viewer to Web API

Changed 20 months ago by tomfukushima

  • owner set to liuar

Changed 18 months ago by jng

  • cc jng added

Changed 12 months ago by jng

  • owner changed from liuar to jng

Changed 12 months ago by jng

  • status changed from new to closed
  • resolution set to fixed

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.