how keep an array in memory

A

Andras Walz

Hi there,

I have written a webservice with VB.net and it runs fine. The problem is the
performance.
I am calculating with an array 1000 x 1000 x 5 elements and it take time to
load it into the memory each time i send a request.
Is there a possibility to keep the array?

Thanks

Andreas
 
T

Trebek

Have you considered caching the array? Usually this is a good solution if
the data is relatively static. Try playing around with the 'CacheDuration'
and 'BufferResponse' attributes on the web method that is generating this
array if the array is a part of the response. If the array is just used to
perform actions on the request data but isn't being marshalled back to the
caller, consider making it static and calculating it in the application's
load evt. If you do elect to pursue the second option, bare in mind that
static or not, concurrency could be an issue if you altering the contents of
the array in the web service methods.

HTH,
Alex
 
A

Andras Walz

Thank you, it works fine. I have used the application load because I only
use the array for internal calculations.

Bye

Andreas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top