Camilo Aguilar-2 wrote:
>
>
> On 2/18/07, Andreas Junghans <[EMAIL PROTECTED]> wrote:
>>
>> Hi Philipp,
>>
>> Am 18.02.2007 um 23:47 schrieb Philipp Wabinski:
>>
>> > I started building a qooxdoo application some months ago. Now I have a
>> > complex table with some Icons, links, text data, dates and so on. Some
>> > filters a limiting the shown entries. We have a lot of data in our
>> > database,
>> > so when I load the table with some testdata of 8000 entries (for
>> > testing)
>> > the memory usage of firefox is increasing from 120.000 K to round
>> > about
>> > 200.000 K. After I reload the data from the database it increases
>> > again to
>> > 270 thousand K. At the third reload it goes to 310.000 K an so on.
>> > I tried
>> > it some more times and it was going up to 380.000 until i stoped it.
>> > After that the memory usage doesn`t decrease.
>> > What do you think about that?
>>
>> I suppose your problem is that with each data-reload, you're creating
>> new qooxdoo objects but never call dispose() on them? By default,
>> every qooxdoo object is registered in a global object db, and if you
>> don't call dispose() on the object if you no longer need it, this
>> reference is held forever.
>>
>
Hi Andreas,
I dont think that I create new objects on the reload of table data. I
something like the following:
I add a table Model with some columns
> this.tableModel = new flare.ui.table.SimpleTableModel();
> this.tableModel.setColumns(["x","y","z"]);
Then I create a table:
> this.table = new qx.ui.table.Table(this.tableModel);
with (this.table) {
// set column renderer, widths etc.
}
I add this Table to my layout and have a button that calls the following
function to load the data of the table from the database.
qx.Proto.updateTable = function(updateObject, selectedKstString)
{
var rpc = new qx.io.remote.Rpc();
rpc.setTimeout(120000);
var mycall = null;
rpc.setUrl(CONFIG["jsonRpcPath"]);
rpc.setServiceName("SERVICE");
rpc.setCrossDomain(true);
mycall = rpc.callAsync(function(result, ex, id) {
mycall = null;
if (ex == null && result != null)
{
_this.tableData = [];
for(i = 0; i < result.length; i++)
{
if(result[i][6])
{
result[i][6] = new
qx.util.format.DateFormat('yyyy-MM-dd').parse(result[i][6]);
}
else
{
result[i][6] = "--";
}
...
.....some more of this....
_this.tableData.push(Array(parseInt(result[i][5]..............),
}
_this.tableModel.setData(_this.tableData);
_this.table._updateStatusBar();
_this.table._updateScrollBarVisibility();
}
That is infact what I am doing. The only objects I create are the DateFormat
objects and some additional stuff.
I tried to dispose this.table or this.tableModel bevor I updated the data
but that doesnt work at all. I get some errors on loading the table or the
memory usage is already increasing.
I also think that I don`t have to dispose the Table, when I reload the table
data. Do I have to call a function to iterate throug this.tableData an
dispose every object inside bevor I add new data? Do I have to dispose every
object I create in the updateTable function?
Thanks for any help
Philipp
--
View this message in context:
http://www.nabble.com/Firefox-memory-usage-tf3191335.html#a9064967
Sent from the qooxdoo-devel mailing list archive at Nabble.com.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel