PDA

View Full Version : webkit- Memory consumption increases per page load ?



Thành Viên Mới
1st June 2011, 09:55
Hi,

I am trying to use webkit (QT) as a server and render pages as and when url
request comes. However, I found that the memory consumption of webkit
process increases with every (different) page load. Fearing that there could
be some problem in my code, I tried the domtraversal example that comes
with qt.

After every page load I clear the cache-

QWebSettings *gs = QWebSettings::globalSettings( );
gs->setMaximumPagesInCache( 0);
gs->setObjectCacheCapacities( 0, 0, 0);
gs->setOfflineStorageDefaultQuota( 0);
gs->setOfflineWebApplicationCacheQuota( 0);
gs->clearIconDatabase( );
gs->clearMemoryCaches( );

However the memory foot print of the domtraversal example keeps on
increasing as I keep browsing the pages.

I am using qt-4.6.1 on Ubuntu/RHEL linux.

Can anyone please let me know how to prevent the memory usage from going up
with every request.