recurse / rdfquery

Automatically exported from code.google.com/p/rdfquery
0 stars 0 forks source link

memory leaks/perfomance issues caused by $.rdf#databanks member (array) #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. huge usage of creating many databank-instances
2.
3.

What is the expected output? What do you see instead?
- databank instances (or any dynamic data) should not beeing hold by a 
"global/static" object (an array in this case)

What version of the product are you using? On what operating system?
- mac/chrome, jquery 1.5.1

Please provide any additional information below.
- any newly created databank instance got an id and will be stored on a static 
databank-array (by its id)
- this behavior is needed for queuing/dequeuing callbacks on loading rdf from 
url, but this functionality can be re-designed with closures and other 
aproaches (e.g. jQuery-Deferreds) to avoid this memory leak.

We are currently using RDF-Query in a semantic project. This api is used as a 
central component to process information within the webapp. In our scenario 
much models/databanks will be created and "destroyed" (but finalizing is not 
really supported yet).

Original issue reported on code.google.com by danilo.h...@gmail.com on 8 Mar 2011 at 11:58

GoogleCodeExporter commented 9 years ago
As a workaround, I added to $.rdf.databank.fn a close() method: 
close: function () { databanks[this.id] = null; },
I explicitly invoke this method in my GUI app when replacing RDF content in a 
page by new downloaded content. Not sure this is completely correct, but it 
made it for my use case. Unfortunately, I didn't find a way to implement this 
without modifying the source file of rdfquery (databanks is just a var, not an 
attribute of $.rdf.databank)

Original comment by francois...@gmail.com on 18 Sep 2012 at 11:27