|
I keep telling people it's impossible, but no one likes that answer. A customer of ours is still using ASP Classic like it's 1986, and they're paying us to fix the mess. They want us to use ASP so they can understand it, and so it integrates cleanly with the rest of their code, mainly session state. Their app gets a lot of traffic, sounds like hundreds of page requests per second.
There are about 140,000 items cached in a list at the application level. There's a six-byte key, and a struct value we need to look up using that key. Relational databases are too slow to get the data from, so it needs to be stored in memory. This takes about 2 MB of RAM, and there's only one copy in the entire app, so that's not an issue.
In ASP Classic, the way you might do this would be to store the items in an array and then iterate over it, looking for the key, and retrieve the value. This is way too slow. I thought about sorting the array and doing a binary search, but the keys change occasionally, so that's out.
Can you do something like Server.CreateObject("HashTable") or am I stuck writing a .NET class, exposing it to COM+, and then using it through interop? I don't understand the part about prime numbers quite well enough to write my own implementation.
|