Browser Issue

M

Mux

Hi,

I have a problem displaying large amount of data on the browser.
The size of the data is to the order of 1.9Mb.

and the time taken is about 10 seconds.
The file is a tree structure, where the depth of the tree is about 5,
and the total nodes are about 3000.

The tree is being constructed using Javascript objects and DOM
statements.
However the response time is still to the order of abt 10-15 seconds to
show the completely rendered page.

Can someone suggest a solution of how to improve the response time.
The application is on Oracle Portal.

Regards,
Mukta
 
N

Nathan

Don't use javascript?

Honestly, javascript is really not ideal to build large pages. Using a
proper sever-side language would probably ease the burden 10 fold.
 
R

Richard Cornford

Mux said:
I have a problem displaying large amount of data on
the browser. The size of the data is to the order of 1.9Mb.

That is an awful lot of stuff to be sending to the client in one go.
and the time taken is about 10 seconds.

And I bet that is on a fast(ish) local network. It will be at least 10
times worse in the wild.
The file is a tree structure, where the depth of the tree is
about 5, and the total nodes are about 3000.

With 3000 nodes the likelihood is that the user will only ever view a
tiny fraction, and if they do view them all it will take then so long to
do so that your 10-15 seconds will be insignificant, particularly if
distributed throughout the process.
The tree is being constructed using Javascript objects and DOM
statements.
However the response time is still to the order of abt
10-15 seconds to show the completely rendered page.

Can someone suggest a solution of how to improve the response time.

What you can, and/or should, do depends on the context in which the
application will be used.

In a public Internet context such a massive tree is probably the wrong
concept, and some sort of pre-selection stage that narrowed the areas of
interest down to a considerably smaller data set would be a better idea.

In an Intranet context, with known configurations/capabilities of
browsers, the option of progressively loading the tree data becomes
viable (via XmlHttpRequests, hidden IFRAMEs etc.). So, maybe loading the
root node and its children (or two levels of children), plus any open
(visible) branches in full, and then progressively loading sub-branches
when their ancestors are opened. Thus unvested branches never need to
have most of their data downloaded or the DOM representations of them
created.

If there are an excessive number of initially visible lower-level nodes
then you could maybe initially load a subset and provide 'next/previous'
nodes to load the neighbour of the initially loaded set (appending to
the tree when the requested additional nodes have background loaded.

In any event the DOM creation can probably be improved by not creating
the DOM nodes until the node in the tree first becomes visible, and then
switching to showing/hiding those nodes once they have been created.
That distributes the time required for DOM creation throughout the
user's interaction with the tree. And nodes that were never visited
would not require a DOM element created for them at all.
The application is on Oracle Portal.

While it is always a good idea to provide this sort of context
information, in this form it is likely to restrict contributions to this
thread to as those unfamiliar with Oracle Portal may be pot off
responding, while they might have practical experience to contribute
acquired form analogous contexts. I.E. it would be an idea to say what
'Oracle Portal' is.

Richard.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top