Reviewed by Alice
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Aug 2006 20:10:00 +0000 (20:10 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Aug 2006 20:10:00 +0000 (20:10 +0000)
commitee62d2d2d07e021f3a6fe464f1f3b026952320a3
tree8350c0337c6c35424e4c072a35b5f4f9470263aa
parent08e623857fa75a0afa0830c453936f194e8a43ab
    Reviewed by Alice

        <rdar://problem/4697973> - Unacceptable delay on startup
        <rdar://problem/4690949> - Need to correctly prune unretained pageurls and icons on startup

        This patch was started by me and finished by Mark Rowe - we now special case all retains during
        startup into one huge sql transaction.  Also we track PageURL retains instead of IconURLs so pruning works right.
        Testing with reasonable sets of bookmarks/history (3000), startup time is neglibile.  Testing with a huge set of
        bookmarks (40,000), startup has a noticable delay, but reasonable, and is inline with shipping safari which also
        has a noticeable delay.

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::IconDatabase):
        (WebCore::IconDatabase::open): adding an initialStartupTransaction and pageRetainStatement
        (WebCore::IconDatabase::close): do cleanup on the initialStartupSQL stuff
        (WebCore::IconDatabase::retainIconForPageURL): Track initial PageURL retains in the temporary table
        (WebCore::IconDatabase::releaseIconForPageURL): Ditto
        (WebCore::IconDatabase::retainIconURL): We no longer special case this on startup
        (WebCore::IconDatabase::releaseIconURL): We no longer special case this on startup
        (WebCore::IconDatabase::pruneUnretainedIconsOnStartup): Handle the big transaction correctly and quickly
        (WebCore::IconDatabase::syncDatabase): Change the timing log message
        * loader/icon/IconDatabase.h:
        * loader/icon/SQLStatement.cpp:
        (WebCore::SQLStatement::bindText16): Added this - for reusing commonly used statements by just rebinding parameters.
        * loader/icon/SQLStatement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/loader/icon/IconDatabase.cpp
WebCore/loader/icon/IconDatabase.h
WebCore/loader/icon/SQLStatement.cpp
WebCore/loader/icon/SQLStatement.h