|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
speeding up web service using ibatisHi,
I'm a relative iBatis novice. The guy who knew much about iBatis left the company about 3 years ago. We have iBatis.Net DataMapper 1.5.1 running on a Windows Server 2003 behind some web services. We're having some trouble with IIS and/or iBatis and I was wondering if you could point me in the right direction. The problem is we would like to quickly run multiple instances of a repetitive web service query. A single call takes about half a second currently. Separating the ibatis calls into a regular multithreaded app and then profiling with 10 threads shows the section of the code involved with opening a connection takes about 30% of the time. These should be the relevant parts: public static volatile ISqlMapper mapper = IBatisNet.DataMapper.Mapper.Instance(); mapper.OpenConnection(connStr); At 30% this routine has the highest percentage time usage, but I don't see any obvious way of avoiding it. Any suggestion would be appreciated. Thanks, Jonathan |
|
|
Re: speeding up web service using ibatisCouple of things.
What database are you backing this against? Do you have connection pooling enabled? On Thu, Aug 6, 2009 at 12:34 PM, Jonathan Lim <jlim@...> wrote:
-- Michael J. McCurrey Read with me at http://www.mccurrey.com http://chaoticmindramblings.blogspot.com/ |
|
|
Re: speeding up web service using ibatisMichael,
Thank you for your quick reply. A quick test of adding Max Pool Size=100;Pooling=true to the connection string did improve the performance of the open connection routine enough that it is no longer the slowest routine. Thanks again for the direction to go towards, Jonathan
|
|
|
Re: speeding up web service using ibatisAwesome, glad to see it worked
On Thu, Aug 6, 2009 at 2:21 PM, Jonathan Lim <jlim@...> wrote:
-- Michael J. McCurrey Read with me at http://www.mccurrey.com http://chaoticmindramblings.blogspot.com/ |
|
|
Re: speeding up web service using ibatisOn Thu, August 6, 2009 11:21 pm, Jonathan Lim said: > > Michael, > > Thank you for your quick reply. A quick test of adding > > Max Pool Size=100;Pooling=true > > to the connection string did improve the performance of the open > connection > routine enough that it is no longer the slowest routine. which database are you using? Correct me if I am wrong but "Max Pool Size=100;Pooling=true" are exactly the default values for the SqlClient, so the pooling should be enabled without specify then in the connection string. http://msdn.microsoft.com/en-us/library/8xx3tyca%28VS.71%29.aspx -- AndreaT --------------------------------------------------------------------- To unsubscribe, e-mail: user-cs-unsubscribe@... For additional commands, e-mail: user-cs-help@... |
|
|
Re: speeding up web service using ibatisThe database was sql server. From what I've read so far I agree that those are the default settings. I don't know exactly why the speed improved. The profiled timings of the calls even with the same connection string do have some significant variation. There is more work to do, but after 4 tries each the fastest time (14.7) occurred with the addition and the worst (21.1) without it.
|
| Free embeddable forum powered by Nabble | Forum Help |