jl145: #i107371# removed performance work-around for XPackageManager->getDeployedPackages

This commit is contained in:
Joachim Lingner 2010-01-13 14:04:07 +01:00
parent 8c72039c7e
commit 5b2cfb2dca

View file

@ -137,18 +137,6 @@ rtl::OUString Databases::expandURL( const rtl::OUString& aURL, Reference< uno::X
return aRetURL;
}
// Hold Packages to improve performance (#i106100)
// The PackageManager implementation seems to completely throw away all cached data
// as soon as the last reference to a XPackage dies. Maybe this should be changed.
struct ImplPackageSequenceHolder
{
Sequence< Reference< deployment::XPackage > > m_aUserPackagesSeq;
Sequence< Reference< deployment::XPackage > > m_aSharedPackagesSeq;
};
static ImplPackageSequenceHolder* GpPackageSequenceHolder = NULL;
Databases::Databases( sal_Bool showBasic,
const rtl::OUString& instPath,
const com::sun::star::uno::Sequence< rtl::OUString >& imagesZipPaths,
@ -199,7 +187,6 @@ Databases::Databases( sal_Bool showBasic,
m_xSFA = Reference< ucb::XSimpleFileAccess >(
m_xSMgr->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ),
m_xContext ), UNO_QUERY_THROW );
GpPackageSequenceHolder = new ImplPackageSequenceHolder();
}
Databases::~Databases()
@ -247,8 +234,6 @@ Databases::~Databases()
++it;
}
}
delete GpPackageSequenceHolder;
}
static bool impl_getZipFile(
@ -1570,9 +1555,6 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextUserHelpPack
thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString::createFromAscii("user") );
m_aUserPackagesSeq = xUserManager->getDeployedPackages
( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
if( GpPackageSequenceHolder != NULL )
GpPackageSequenceHolder->m_aUserPackagesSeq = m_aUserPackagesSeq;
m_bUserPackagesLoaded = true;
}
@ -1602,9 +1584,6 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextSharedHelpPa
thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString::createFromAscii("shared") );
m_aSharedPackagesSeq = xSharedManager->getDeployedPackages
( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
if( GpPackageSequenceHolder != NULL )
GpPackageSequenceHolder->m_aSharedPackagesSeq = m_aSharedPackagesSeq;
m_bSharedPackagesLoaded = true;
}