C
cycheng
I write a web service which holds a static hashtable
At the first method invocation, the constructor loads the hashtable
then the look-up method of the web service can run quickly by look up
the pre-loaded hashtable
My question is, if the web service has not called for a period of the time
the memory used by the hashtable seems to be swap out
Then the look-up method will take a long time
It is even longer than the time to load the whole hashtable
I want to emphasize that the web serivce does not be recycled
I have the log code to show the constructor does not called again
Anyone has the solution
At the first method invocation, the constructor loads the hashtable
then the look-up method of the web service can run quickly by look up
the pre-loaded hashtable
My question is, if the web service has not called for a period of the time
the memory used by the hashtable seems to be swap out
Then the look-up method will take a long time
It is even longer than the time to load the whole hashtable
I want to emphasize that the web serivce does not be recycled
I have the log code to show the constructor does not called again
Anyone has the solution