Once in a while I’m get called to help figuring out why are are our application running slow.
Though in the majority of cases we end up on the some tier – the database, sometime we get some surprises. This was one of this cases.
I started following a 8 seconds search page. The application had little or no instrumentation, so all I started with IIS logs:
- 1 call to OurSearchFunction.aspx: 8 s
- Abount 10 consecutive calls to a local GiveMeSomeRowDataWebService.asmx: totaling about 7 s
Uhm… strange, isn’t it? Looking at the code, I’ve found a datagrid that was calling a WebService for each produced row !As we only needed to get the information when the user followed a link on the grid, we move it to the corresponding event, saving around 90% on wasteful calls.