Changeset 138944 in webkit


Ignore:
Timestamp:
Jan 7, 2013 7:40:19 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[Qt] Major performance improvement in Qt's PluginDatabase implementation
https://bugs.webkit.org/show_bug.cgi?id=106140

Patch by David Faure <faure@kde.org> on 2013-01-07
Reviewed by Simon Hausmann.

No new tests, only a performance improvement.

  • plugins/qt/PluginPackageQt.cpp:

(WebCore::PluginPackage::fetchInfo): Don't do a full-fledged load(), load the module directly.
(WebCore::PluginPackage::load): Use existing module if fetchInfo created it.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r138936 r138944  
     12013-01-07  David Faure  <faure@kde.org>
     2
     3        [Qt] Major performance improvement in Qt's PluginDatabase implementation
     4        https://bugs.webkit.org/show_bug.cgi?id=106140
     5
     6        Reviewed by Simon Hausmann.
     7
     8        No new tests, only a performance improvement.
     9
     10        * plugins/qt/PluginPackageQt.cpp:
     11        (WebCore::PluginPackage::fetchInfo): Don't do a full-fledged load(), load the module directly.
     12        (WebCore::PluginPackage::load): Use existing module if fetchInfo created it.
     13
    1142013-01-07  Gabor Rapcsanyi  <rgabor@webkit.org>
    215
  • trunk/Source/WebCore/plugins/qt/PluginPackageQt.cpp

    r129647 r138944  
    3939bool PluginPackage::fetchInfo()
    4040{
    41     if (!load())
    42         return false;
     41    if (!m_module) {
     42        m_module = new QLibrary((QString)m_path);
     43        m_module->setLoadHints(QLibrary::ResolveAllSymbolsHint);
     44        if (!m_module->load()) {
     45            LOG(Plugins, "%s not loaded (%s)", m_path.utf8().data(),
     46                m_module->errorString().toLatin1().constData());
     47            return false;
     48        }
     49    }
    4350
    4451    NPP_GetValueProcPtr gv = (NPP_GetValueProcPtr)m_module->resolve("NP_GetValue");
     
    6269
    6370    setMIMEDescription(String::fromUTF8(gm()));
    64     m_infoIsFromCache = false;
    6571
    6672    return true;
     
    156162        return false;
    157163
    158     m_module = new QLibrary((QString)m_path);
    159     m_module->setLoadHints(QLibrary::ResolveAllSymbolsHint);
    160     if (!m_module->load()) {
    161         LOG(Plugins, "%s not loaded (%s)", m_path.utf8().data(),
     164    if (!m_module) {
     165        m_module = new QLibrary((QString)m_path);
     166        m_module->setLoadHints(QLibrary::ResolveAllSymbolsHint);
     167        if (!m_module->load()) {
     168            LOG(Plugins, "%s not loaded (%s)", m_path.utf8().data(),
    162169                m_module->errorString().toLatin1().constData());
    163         return false;
     170            return false;
     171        }
    164172    }
    165173
Note: See TracChangeset for help on using the changeset viewer.