Channels ▼
RSS

.NET

Charting: Fast and Efficient

Source Code Accompanies This Article. Download It Now.


Grady is a Senior Project Manager for SmarterTools Inc. He can be contacted at gwerner@smartertools.com.


As a senior project manager for SmarterTools (www.smartertools.com), one of my roles is to constantly evaluate our integration with new technologies and third-party components to keep our distributable ASP.NET 1.1 and 2.0 applications at the cutting edge of technology and design. Recently, I had the opportunity to reevaluate our use of charting components to see if we had the right fit for our applications and to look for opportunities to make our products better, faster, and more agile.

Our software requirements are different than other companies. Unlike most software development, which starts with the needs of small businesses and individual customers in mind, our software is designed from the onset with a focus on high-stress environments (such as hosting companies and ISPs), and then adjusted to make a good fit in smaller installations. We favor this approach because it makes the end product inherently more stable and scalable.

The Problem

Most Windows-based business software these days comes in one of two flavors—installable Windows applications and hosted services. Our software differs in that our interfaces are completely web based, but the web application is installed on the customers' servers rather than hosted at our facility. Designing our software this way has led to several key advantages, such as easy maintenance and remote management for administrators.

It has also led to a few disadvantages. One of which is that component vendors typically target one or two of the "typical" flavors of development (Windows services or hosted web applications, for instance), and very few support the hybrid model that has made our products catch on so quickly.

Several years ago, during the initial development of SmarterStats (our website traffic-analysis package), we evaluated many vendors. At the time, most of the popular charting components only supported the per-website or per-server licensing model. Some were willing to bend and operate on a per-installation royalty, but even this did not meet our needs because it increased the cost of our products by up to $100 and sometimes more. Because of our commitment to a value-pricing structure and a free product distribution model, royalties are a huge roadblock.

Our management is intent on maintaining a free version of all of our products and we believe that charging royalties would not only hurt product distribution, but would negatively affect our small-business and hosting-industry purchase rates where the environment is very competitive and the margins are rather small.

Again, the need to support very large-scale environments leads us to another difficulty—the performance needs of the components we use. Our software (especially SmarterStats, see Figure 1) needs to be capable of generating up to several hundred thousand charts per day (a requirement in the larger hosting company environments). These charts also need to be generated in the web interface as well as through automated e-mail reports that run in a background thread. Needless to say, issues of performance came up very quickly.

[Click image to view at full size]

Figure 1: SmarterStats.

Some charting packages generated extremely nice-looking charts, but took up to five seconds per chart. Others worked quickly, but looked terrible or required controls to be embedded on an ASP.NET page to work.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Video