开发者

How to improve performance using WCF Service

开发者 https://www.devze.com 2023-02-27 04:35 出处:网络
My scenario is : WebApp -> WCF Service ->Oracle DB I am using custom paging & binding gridview at client side so to avoid postback i m using webmethod in WebApp which calls a W开发者_如何学GoCF m

My scenario is : WebApp -> WCF Service -> Oracle DB

I am using custom paging & binding gridview at client side so to avoid postback i m using webmethod in WebApp which calls a W开发者_如何学GoCF method which in turn calls a Stored Procedure in Oracle .This SP returns a DataTable approx 1 MB of size. So every time when i perform any operation on a gridview it fetches 1MB of data from service which degrades application performance as i m interested only in 100 records(Paging). I can not modify the SP what is the other way available to improve the performance?


Of course the best solution would be to query the data in pages, but since you can't touch the stored procedure that option is not available to you. So the next best thing is to query the data once and cache the results in the ASP.NET session. That way you only hit the database once, and subsequent calls are taken from an in-memory representation of your query results.

I was able to find this blog post with pretty good coverage of using ASP.NET sessions with WCF.

0

精彩评论

暂无评论...
验证码 换一张
取 消