简体   繁体   English

ASP.NET MVC3图表控件性能/最佳实践

[英]ASP.NET MVC3 Chart Control Performance/Best Practices

I am currently using the Chart Control from System.Windows.Forms.DataVisualization to dynamically creating 10 chart images from data that comes from a MySQL database with the help of the Entity Framework. 我目前正在使用System.Windows.Forms.DataVisualization的Chart控件在实体框架的帮助下根据来自MySQL数据库的数据动态创建10个图表图像。 The type of chart in question is fastline and they are created within a controller to be serve to a view as well as to be saved to disk. 所涉及的图表类型是快速线,它们是在控制器内创建的,可用于视图以及保存到磁盘。

Can the serve and save functionality of the chart images become a bottleneck with multiple users accessing the site? 图表图像的服务和保存功能是否会成为多个用户访问站点的瓶颈? Also, are there any best practices when it comes to serving and saving the charts? 此外,在提供和保存图表方面是否有最佳实践?

Thank you for any help or comment on this subject. 感谢您对此主题的任何帮助或评论。

* Edit: this is for an intranet site. * 编辑:这是针对Intranet网站的。

I only use the Chart Control from MS if it's an intranet app , if it's an Online application I always go with Google Charts API . 仅当它是Intranet应用程序时 ,才使用MS的Chart控件 ;如果它是在线应用程序 ,则我总是使用Google Charts API

it's way more simple as it's only a <img> tag and you can have as much as you want, Google will handle the bandwidth. 它更简单,因为它只是一个<img>标记,您可以根据需要拥有尽可能多的内容,Google会处理带宽。

When using MSCC, I tend to choose memory if there are only 100 users, if more, I have to go with saving to a physical place. 当使用MSCC时,如果只有100个用户,我倾向于选择内存;如果更多,我必须选择保存到物理位置。

<add key="ChartImagehandler" value="storage=memory;timeout=20" />

on one of my last online projects (ASP.NET MVC) I used Google charts to display 26 charts on that page (each client had diff stats): 在我上一个在线项目(ASP.NET MVC)上,我使用Google图表在该页面上显示了26个图表(每个客户端都有diff统计信息):

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM