提高asp.net页面的性能

发布于 2024-10-05 21:31:30 字数 114 浏览 0 评论 0原文

我们有一页在视图状态压缩后大约有 300 KB。加载速度非常慢。我们正在使用 telerik tabstrip。为此选项卡加载了 8 个用户控件。我们是否可以提高此页面的性能?任何想法请。

谢谢..

We have one page which is about 300 KB after compression of viewstate. It's loading very slow. We are using telerik tabstrip. There are 8 user controls being loaded for this tab. Is there anyway we can improve the performance of this page? Any ideas please.

Thanks..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

云归处 2024-10-12 21:31:30

是的,不启用视图状态是一种方法。或者,您可以按需加载每个选项卡,因此当单击该选项卡时,会引发回发,并显示该选项卡的内容(可以将其包装在 Telerik 的 RadAjaxPanel 中)。

最后,Telerik 拥有丰富的 Web 服务模型;单击选项卡时,通过 Web 服务将信息绑定到 UI。这是我们必须做的事情,而且在性能方面效果非常好。

HTH。

Yes, don't enable viewstate is one approach. Alternatively, you could load each tab on demand, so when the tab is clicked, cause a postback, and show that tab's content (which could be wrapped in a RadAjaxPanel from Telerik).

Lastly, Telerik has a rich web service model; bind the information to the UI via web services when the tab is clicked. This is something we had to do and it worked out very well performance-wise.

HTH.

拥有 2024-10-12 21:31:30

您可以尝试页面级缓存 - 此处

You can try page level caching - here

宛菡 2024-10-12 21:31:30

就 RadTabStrip 本身而言,您还可以考虑使用按需加载功能,可以在 此演示页面

至于整体页面效率,如果您已经使用 Telerik RadControls,您可以考虑使用 RadAjax 控件;特别是 RadAjaxManager。这将允许您设置部分回发并获得更高效的页面。可以在此处找到此演示。

In terms of the RadTabStrip itself you could also potentially look into using the Load-on-Demand feature as well, found on this demo page.

As for overall page efficiency if you are using the Telerik RadControls already you could look into using the RadAjax control; particularly the RadAjaxManager. This will allow you set up partial postbacks and get a more efficient page. A demo of this can be found here.

自演自醉 2024-10-12 21:31:30

我们的 Telerik 选项卡控件的使用效率不高。每个未使用的选项卡仍然会经历页面生命周期。您对此无能为力,但通过一些额外的配置,您可以获得一些效率。

对于要显示的选项卡,您可以为要在所选选项卡上显示的 UserControl 动态LoadControl

Our of the box use of the telerik tab control is not efficient. Each tab not in use STILL GETS put through the page lifecycle. There isn't anything that you can do about that out of the box, but with a little extra configuration you can gain some efficiency.

For the tab that is to be shown, you can dynamically LoadControl for the UserControl that is to be shown on the selected tab.

北陌 2024-10-12 21:31:30

你永远不能使用 telerik!它对自身产生了如此严重的内部依赖,其臃肿、不必要的复杂功能让我想吐。自己动手以获得最佳结果...MVC 太棒了!或者只是按照上面的答案并准备好进行大量的试验和错误... :sadface:

You could always not use telerik! It creates such a heavy internal dependence on itself with bloated, unnecessarily complex features it makes me want to vomit. Do it yourself for best results...MVC rocks! Or just follow the answers above and get ready for lots of trial and error... :sadface:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文