Rewritemap question

Topics: Developer Forum, User Forum
Feb 19, 2010 at 2:11 PM


I am running on version 2.1 and taking advantage of the the Rewritemap using a product map. My concern is about how this txt map file is handled by the filter: looking at the log file I do notice that the full txt file is read for every request. Our list has about 20,000 products - why reading it for every request? Isn't this a performance issue? I am not worried about what I see in the log - I can disable teh log - but the actual way IIRF is searching in the map file. Can you please describe how this is working?

Also I did notice a post mentioning a rnd map file. Where can I find documentation on it?




Feb 19, 2010 at 3:44 PM
Edited Feb 19, 2010 at 3:47 PM

> I do notice that the full txt file is read for every request.

No.  It shouldn't.  As stated in the documentation,

For the plain text map files, the key/value pairs are cached in memory for quick matching. IIRF loads new values automatically when the map file changes.


If the map file has been updated, then IIRF will re-read it.   IIRF checks the timestamp on the map file for every request.

Once the map is read into memory, to determine if a match is made, IIRF compares the subject string to each string in the map, or until a match is found, via a call to the strcmp function in libc. 

You can find documentation on the rnd map type at the link I gave above, or in the .chm file that's included in the IIRF download.