2

Closed

Use hashtable to speed up map lookups

description

I've got a site working using your excellent product but it's running slow, especially when first called. I'm guessing the first run is cacheing but subsequent requests aren't as quick as I'd hoped. Here's my configuration:
 
Site is on IIS6, ASP.Net v2 and cacheing is on (in the IIS website properties)
 
It's running in it's own application pool nothing else in it.
 
I have set worker process to recylce after 6 hrs being idle rather than 20 minutes default (it's a new site so not getting many hits just yet).
 
there are 2 mapfiles. One has 45,000 entries, the other about 2,000
 
You can see the speed issue at www.hit the bar.co.uk
(please note I've added spaces as I don't want it spidering yet!) and select
BROWSE. Assuming no-one has request that page recently then it might take a few seconds (6-7)
 
If that is quick then select a letter from the A-Z like B,S or T and that might still be slow (3-4 seconds)

file attachments

Closed Sep 8, 2011 at 12:50 AM by Cheeso
implemented in changeset 92424.Will be available in binary releases AFTER v2.1.2.0

comments

webbysteve wrote Sep 7, 2011 at 7:07 AM

Thanks Cheeso, I've uploaded the big mapfile I'm using if that's any use for you.

Cheeso wrote Sep 7, 2011 at 3:18 PM

OK Steve, I've produced an interim build with a bsearch retrieval of map entries.
Try this out and let me know how it goes. It should run a little slower on the first request, because it performs a qsort. It should run significantly faster on subsequent requests. I don't know "how much" - I'll be interested to hear your results.

Be sure to get the proper build - x86 or x64. To use it, (a) stop IIS, (b) rename the existing IIRF.exe and IIRF.pdb (if any) in the install directory to IIRF.orig.exe and IIRF.orig.pdb. (c) copy the IIRF.exe and IIRF.pdb from this zip into your IIRF install directory. (d) restart IIS. You may need to check/verify permissions on the IIRF.exe via icacls.exe .

After you confirm that this delivers good results I'll produce a proper build.

Cheeso wrote Sep 7, 2011 at 3:18 PM

Here's the x64 build

webbysteve wrote Sep 7, 2011 at 9:42 PM

Hi Cheeso - I've tried that and it sped things up a little but I identified during testing that my database read was the slowest thing NOT IIRF which even at 45,000 records seems to be like lightning so you can save yourself some work.

Thanks very much for the reply and time taken.

Cheeso wrote Sep 8, 2011 at 12:13 AM

OK, Steve, thanks for the reply. It is still work the work, because it will save significant time on lookups into large maps. Not 3-4 seconds, but ... it will save time.

I'll close this workitem.