Hi all,
I have a question about loading time. I was previously using loadXML to
load a sample XML file, which worked fine. But, because all my work is done
client side, I could no longer use the loadXML method, I had to dynamically
create a JSON array of objects on the UI side and use loadJSON instead.
But, I'm noticing that even with the same exact data (in XML format vs JSON
format), the XML file loads significantly faster (1-2 secs). However, when
I convert it to JSON format and use loadJSON, any object with more than 24
events crashes the browser. I know I don't have a syntax issue, because
when I shove < 24 events into my JSON object, it loads fine. It's just when
I have more than that, it crashes.
I found out through some testing that 24 was the magic number that broke
the browser.
Here is my code:
//JSON Object
var timelineDataObject = {events : [] };
....
//Add to JSON obj
timelineDataObject.events.push({
"start" : timestamp,
"title" : label,
"description" : desc
});
eventSource.loadJSON(timelineDataObject,'');
tLine.finishedEventLoading();
I create timestamp, label, desc dynamically while looping through an array,
I know those are created properly because like I said, it works with < 24
events. Anyone know a way to increase performance and load it up faster to
avoid crashing the browser?
Thanks in advance!
--
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/simile-widgets?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.