Re: caching large XML files in an ASP.net application

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Janaka (janaka_at_magicalia.com)
Date: 05/20/04


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
>
>



Relevant Pages

  • Re: Loading to a DOM object
    ... in the asp page where i load the XML to the DOM object using load. ... The error is from ASP on loading the XML to the DOM object. ...
    (microsoft.public.vb.general.discussion)
  • DataSet to Dataview to Dataset to XML!
    ... Load records in a DataSet: ... 2)Generate a DataView form table inside dataset and order it (i must ... Now i need convert data to XML, but not only one XML file, N XML ...
    (microsoft.public.dotnet.framework.adonet)
  • SQL Table to DataSet to Dataview, to DataSet to XML!
    ... Load records in a DataSet: ... 2)Generate a DataView form table inside dataset and order it (i must ... Now i need convert data to XML, but not only one XML file, N XML ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: VBSCRIPT & XML - Easy solution?
    ... This can easily be done in ASP by processing the XML file in one of three ways: ... Actual syntax varies depending on what you back end server is running. ... Client side assuming you ONLY what to support IE you could embed the XML as a Data Island and then use VBScript / Javascript to walk the nodes etc using the DOM. ...
    (microsoft.public.vstudio.development)
  • Load huge xml file
    ... I'm looking for solution/strategy how load big xml file. ... and has another elements itd. ... I would like avoid load all into memory because size of XML file can increase in future. ...
    (comp.lang.java.programmer)