Performance enhancements in fp loading, string cmp, etc.

Knocks about 1/3 off the first footprint load, and more than 1/2
off subsequent loads.
This commit is contained in:
Jeff Young
2018-08-01 09:35:46 +01:00
parent 0a35c5c97e
commit f8a5e2c1c8
31 changed files with 370 additions and 214 deletions
+10 -9
View File
@@ -38,9 +38,8 @@
static void not_implemented( PLUGIN* aPlugin, const char* aCaller )
{
THROW_IO_ERROR( wxString::Format( FMT_UNIMPLEMENTED,
aPlugin->PluginName().GetData(),
wxString::FromUTF8( aCaller ).GetData() )
);
aPlugin->PluginName().GetData(),
wxString::FromUTF8( aCaller ).GetData() ) );
}
@@ -73,9 +72,9 @@ void PLUGIN::PrefetchLib( const wxString& aLibraryPath, const PROPERTIES* aPrope
}
MODULE* PLUGIN::LoadEnumeratedFootprint( const wxString& aLibraryPath,
const wxString& aFootprintName,
const PROPERTIES* aProperties )
const MODULE* PLUGIN::GetEnumeratedFootprint( const wxString& aLibraryPath,
const wxString& aFootprintName,
const PROPERTIES* aProperties )
{
// default implementation
return FootprintLoad( aLibraryPath, aFootprintName, aProperties );
@@ -83,7 +82,7 @@ MODULE* PLUGIN::LoadEnumeratedFootprint( const wxString& aLibraryPath,
MODULE* PLUGIN::FootprintLoad( const wxString& aLibraryPath, const wxString& aFootprintName,
const PROPERTIES* aProperties )
const PROPERTIES* aProperties )
{
// not pure virtual so that plugins only have to implement subset of the PLUGIN interface.
not_implemented( this, __FUNCTION__ );
@@ -91,14 +90,16 @@ MODULE* PLUGIN::FootprintLoad( const wxString& aLibraryPath, const wxString& aFo
}
void PLUGIN::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootprint, const PROPERTIES* aProperties )
void PLUGIN::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootprint,
const PROPERTIES* aProperties )
{
// not pure virtual so that plugins only have to implement subset of the PLUGIN interface.
not_implemented( this, __FUNCTION__ );
}
void PLUGIN::FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName, const PROPERTIES* aProperties )
void PLUGIN::FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName,
const PROPERTIES* aProperties )
{
// not pure virtual so that plugins only have to implement subset of the PLUGIN interface.
not_implemented( this, __FUNCTION__ );