T
TKapler
I got a javasscript based aplication, which is working with data from
server (php&sql, changed once per week or so). Actualy I use a xml as a
data format with structure e.g.
[item var1="smthng" var2="123" var3="456" var4="ABC" /]
I open read the file through XMLHttpRequest and then i do smtg like
items = documentElement.getElementsByTagName("item");
for i=0 to items.lenght {
var1=item.getAttribute("var1")
....
function(var1, var2, var3, var4)
}
The problem is, that it is quite slow with 100 items i'am sometimes
over 5 secs total execution time on firefox and it than write an error
message. The others browsers do not write this message, but they are
even slower, up to 20 secs for IE
The slow thing is that file access and making a variable from it.
If wonder that there may be some much faster way, as i do not need the
data to be in xml, i can make any data format, i can even make
something like var dump. But i do not know how to parse this dump to
variable, and i do not know if it will be faster
Or are there some other fast ways how to quicker load the data?
server (php&sql, changed once per week or so). Actualy I use a xml as a
data format with structure e.g.
[item var1="smthng" var2="123" var3="456" var4="ABC" /]
I open read the file through XMLHttpRequest and then i do smtg like
items = documentElement.getElementsByTagName("item");
for i=0 to items.lenght {
var1=item.getAttribute("var1")
....
function(var1, var2, var3, var4)
}
The problem is, that it is quite slow with 100 items i'am sometimes
over 5 secs total execution time on firefox and it than write an error
message. The others browsers do not write this message, but they are
even slower, up to 20 secs for IE
The slow thing is that file access and making a variable from it.
If wonder that there may be some much faster way, as i do not need the
data to be in xml, i can make any data format, i can even make
something like var dump. But i do not know how to parse this dump to
variable, and i do not know if it will be faster
Or are there some other fast ways how to quicker load the data?