OVERVIEW
When starting/connecting with the start() or connect() methods the library will create a pool of Chrome pages ready for re-use. The default pool size value of 2 will suit most applications. Large volume applications can set this to a higher value to handle a higher concurrency. See the setPoolSize() method.
When generating images the library will acquire a page from the pool, generate the image, release the page back to the pool. If there are no available pages in the pool the library will wait until one becomes free.
In most cases a page is locked for a few hundred milliseconds before being released back to the pool.
TESTING CRITERIA
The performance figures below are based on generating a base64 encoded png image of the listed Highcharts demo chart. Size and complexity of the chart will also have some impact on times.
For this test the JavaScript charting library files were not stored locally.
Concurrent users is the number of users calling the toBase64Image() method at exactly the same time.
RESULTS
Highcharts Demo Chart | Concurrent Users | Page Pool Size | Base64 Encoded Image Generation (ms) |
Basic column | 1 | 2 | 64 |
Line chart | 120 | ||
Pie chart | 67 | ||
Basic column | 2 | 2 | 80 |
Line chart | 127 | ||
Pie chart | 90 | ||
Basic column | 3 | 2 | 131 |
Line chart | 163 | ||
Pie chart | 103 | ||
Basic column | 4 | 2 | 172 |
Line chart | 183 | ||
Pie chart | 168 | ||
Basic column | 5 | 2 | 221 |
Line chart | 213 | ||
Pie chart | 195 | ||
Basic column | 5 | 3 | 158 |
Line chart | 184 | ||
Pie chart | 140 | ||
Basic column | 5 | 4 | 145 |
Line chart | 181 | ||
Pie chart | 125 |