Loading large file


C

CSharper

I have a situation where I need to load a very large (10MB) XML file
and display it to the user. The file is loaded using web services and
then display it on the web browser. As you can imagine other than the
delay in loading the large file, sometimes I get timeout complains.
What is the best way to load and show the data to the user?

Thanks,
 
Ad

Advertisements

P

Pavel Minaev

I have a situation where I need to load a very large (10MB) XML file

That's not a large file.
and display it to the user. The file is loaded using web services and
then display it on the web browser

Since I doubt that you display raw XML to user, this implies an
existence of XSLT stylesheet, or some other way to process the file
for rendering. Details?
As you can imagine other than the
delay in loading the large file, sometimes I get timeout complains.

You get timeout complaints from what?
What is the best way to load and show the data to the user?

Load and process it on a background thread as much as possible.
Probably using BackgroundWorker as usual.
 
X

xcal

I suppose you need to have the bits of the parts of the file you load,
then to find some bits that represent the start/end of some workable
parts of the file, and then you can present those parts on the web browser
according your needs. Sorry I never did something like this, so I don't know
if you must work with bits or bytes or other things, I believe
this depends on the kind of work you're doing, etc.

hope this helps, Carlos.
 
Ad

Advertisements

P

Paul

Look at Asynch web pages and Asynch Web Services, and create some method for
notifying the user when their request is ready from the webservice then you
only need worry about your webrequest timing out to fetch the XML from the
Web Site rather than the Web Service BLL.


So

User -------> Web Site ---------> User (user waits only to kick off the
request)
---------> Web Service ----------->
WebSite (user does not wait while the BLL services the request)
User -------> Web Site ---------> Get from Cache ---------->User (user only
waits to get data from website)

rather than

User -----------> Website --------> WebService---------->
Website ----------->User (User waits for everything)
 

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

Top