Re: caching large XML files in an ASP.net application
From: Janaka (janaka_at_magicalia.com)
Date: 05/20/04
- Next message: Jesper Stocholm: "Re: Output parameters not returned from SP"
- Previous message: Teemu Keiski: "Re: Output parameters not returned from SP"
- In reply to: spammy: "caching large XML files in an ASP.net application"
- Next in thread: spammy: "Re: caching large XML files in an ASP.net application"
- Reply: spammy: "Re: caching large XML files in an ASP.net application"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 20 May 2004 12:16:11 +0100
Spammy
sorry i haven't tried using any of the Threading classes with ASP.NET,
however you might be able to change some other parts of the application to
solve your problem?
first of all is all the data changing in the xml file? If possible i've
found it easier to split out a large xml file into several smaller files and
use xslt on them to make a kind of view of the combined data.
try seeing if its possible to use the Cache object to store the data
(however if the cache has to be cleared every second i don't think this
would give you a large benefit).
J
"spammy" <me@privacy.net> wrote in message
news:2h3d65F8ktooU1@uni-berlin.de...
> hi all,
>
> im currently writing an ASP.net front end to display data found in an XML
> file. the XML file is quite large (700k or so), and so takes a while to
> load. it will be changing around every second, so needs to be loaded at
> least at that rate. at the moment, the ASP application loads the xml every
> refresh - im thinking that this may cause problems when there are 20
clients
> each refreshing once per second.
>
> the solution im thinking of is to have a thread accessible to all the ASP
> instances that deals with loading and refreshing the XML into a dataset.
it
> would do this every second and make the dataset available to all ASP
> instances to read from.
>
> how would this work? assuming you can create threads as normal in an ASP
> application, how do i make it accessible to all of them? by making it
> static? which applicaiton thread instance would be in charge of starting
and
> stopping the XML reading thread? i mean the first should start it and the
> last to exit should quit it, but can this be detected? or is a timeout a
> best way to quit it (not accessed in a minute -> quit). is this thread a
> particularly efficient way of doing this, or would it put another
> unnecessary load on to the webserver?
>
> if i dont use a thread, whats the best way to implement the XML reading?
it
> would have to be a shared dataset, but only updated once every second -
how
> would this timekeeping be implemented by the various application threads?
>
> thanks in advance, and sorry for the many questions!
>
> spammy
>
>
- Next message: Jesper Stocholm: "Re: Output parameters not returned from SP"
- Previous message: Teemu Keiski: "Re: Output parameters not returned from SP"
- In reply to: spammy: "caching large XML files in an ASP.net application"
- Next in thread: spammy: "Re: caching large XML files in an ASP.net application"
- Reply: spammy: "Re: caching large XML files in an ASP.net application"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|