L
Laser Lips
Hi All. I'm building t a User Interface, which populates tables from
a database dynamically. It's using a technology called CACHE
(pronounced cashai, made by intersystem’s) to get the data form the
server. There is no page loading or refreshing. It's very much like
Ajax except there is no external file called, the server interprets
these calls right there on the page and returns the value, just like
calling a function. Interesting stuff.
Anyway, the data I get back is a huge JSON object, which sits in
memory; this doesn’t seem to pose a problem. I've got Windows Task
Manager open and I watch the little line graph move up and down.
I iterate through the JSON object to populate a table. There are only
about 1000 rows so it’s not many, but I am building the table
pragmatically using the DOM.
The first time I run this code it shoots through very quickly. Even
if a I press the button which causes it to run through the process
again, it still runs quickly. And even if I press it continuously, it
runs the same speed. But if I refresh the page by right clicking and
'refresh page' or 'F5' the code runs but slower. And every subsequent
page refresh and code run the code gets slower and slower. The CPU
usage line graph starts hitting the roof.
I would have thought that the page refresh would clear memory?
I'm trying to clear up after myself by setting certain variable to
null, but no change. If I close the browser down and start again, the
code runs quick again.
Why does the code run the same speed until I refresh the page. Are
new variables being instantiated each time I load the page and the old
ones staying alive?
Cheers All.
Graham
a database dynamically. It's using a technology called CACHE
(pronounced cashai, made by intersystem’s) to get the data form the
server. There is no page loading or refreshing. It's very much like
Ajax except there is no external file called, the server interprets
these calls right there on the page and returns the value, just like
calling a function. Interesting stuff.
Anyway, the data I get back is a huge JSON object, which sits in
memory; this doesn’t seem to pose a problem. I've got Windows Task
Manager open and I watch the little line graph move up and down.
I iterate through the JSON object to populate a table. There are only
about 1000 rows so it’s not many, but I am building the table
pragmatically using the DOM.
The first time I run this code it shoots through very quickly. Even
if a I press the button which causes it to run through the process
again, it still runs quickly. And even if I press it continuously, it
runs the same speed. But if I refresh the page by right clicking and
'refresh page' or 'F5' the code runs but slower. And every subsequent
page refresh and code run the code gets slower and slower. The CPU
usage line graph starts hitting the roof.
I would have thought that the page refresh would clear memory?
I'm trying to clear up after myself by setting certain variable to
null, but no change. If I close the browser down and start again, the
code runs quick again.
Why does the code run the same speed until I refresh the page. Are
new variables being instantiated each time I load the page and the old
ones staying alive?
Cheers All.
Graham