[Qt-interest] Opening new windows with window.open() from QtWebKit is slow
Arend van Beelen
arendjr at gmail.com
Tue Dec 2 18:12:17 CET 2008
Hi all,
I'm building a chat application, which is largely build around
QtWebKit. The application consists (simplified) of a roster window,
where all the contacts are shown, and one or more session windows,
where the actual chats between users are. The business logic of the
application is mostly written in JavaScript, so the contact list,
etcetera are kept in memory in JavaScript. When opening a new session
window, I use window.open() from JavaScript to open the window, which
is essential to let the session windows communicate with the roster
window through the window.opener property.
However, the problem I'm seeing is that the more contacts are in
someone's contact list, the slower it becomes to open a new session
window. When I have 300 contacts in my roster window, it is taking
about 6 seconds (!) to open a new session window. I've traced the
problem back to the window.open() call which apparently is taking a
more or less linear amount of time compared to the number of contacts
in the roster window (or generally, to the amount of data allocated by
JavaScript).
Can somebody please explain to me why this is so (horribly) slow? And
better yet, do you know any suggestions on how I can speed this up?
Thanks,
Arend jr.
--
Arend van Beelen jr.
"If you want my address, it's number one at the end of the bar."
More information about the Qt-interest-old
mailing list