Performance enhancement: don't process envvars in configs.
This commit is contained in:
parent
0cd75b2556
commit
c1cf7c32c3
|
@ -38,6 +38,9 @@ void BIN_MOD::Init()
|
||||||
// do an OS specific wxConfig instantiation, using the bin_mod (EXE/DLL/DSO) name.
|
// do an OS specific wxConfig instantiation, using the bin_mod (EXE/DLL/DSO) name.
|
||||||
m_config = GetNewConfig( wxString::FromUTF8( m_name ) );
|
m_config = GetNewConfig( wxString::FromUTF8( m_name ) );
|
||||||
|
|
||||||
|
// wxWidgets' implementation of this is *very* expensive, and we don't use them anyway.
|
||||||
|
m_config->SetExpandEnvVars( false );
|
||||||
|
|
||||||
m_history.Load( *m_config );
|
m_history.Load( *m_config );
|
||||||
|
|
||||||
// Prepare On Line Help. Use only lower case for help file names, in order to
|
// Prepare On Line Help. Use only lower case for help file names, in order to
|
||||||
|
|
|
@ -362,20 +362,17 @@ bool PROJECT::ConfigLoad( const SEARCH_STACK& aSList, const wxString& aGroupNam
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We do not want expansion of env var values when reading our project config file
|
||||||
|
cfg.get()->SetExpandEnvVars( false );
|
||||||
|
|
||||||
cfg->SetPath( wxCONFIG_PATH_SEPARATOR );
|
cfg->SetPath( wxCONFIG_PATH_SEPARATOR );
|
||||||
|
|
||||||
wxString timestamp = cfg->Read( wxT( "update" ) );
|
wxString timestamp = cfg->Read( wxT( "update" ) );
|
||||||
|
|
||||||
m_pro_date_and_time = timestamp;
|
m_pro_date_and_time = timestamp;
|
||||||
|
|
||||||
// We do not want expansion of env var values when reading our project config file
|
|
||||||
bool state = cfg.get()->IsExpandingEnvVars();
|
|
||||||
cfg.get()->SetExpandEnvVars( false );
|
|
||||||
|
|
||||||
wxConfigLoadParams( cfg.get(), aParams, aGroupName );
|
wxConfigLoadParams( cfg.get(), aParams, aGroupName );
|
||||||
|
|
||||||
cfg.get()->SetExpandEnvVars( state );
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue