mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-02 03:26:29 +03:00
Optimization to reduce almost to zero allocations during frame rendering in ecode (this gives around 6% perf gains).
This commit is contained in:
@@ -258,8 +258,11 @@ void GitPlugin::initModelStyler() {
|
||||
auto model = static_cast<const FileSystemModel*>( index.model() );
|
||||
auto node = static_cast<const FileSystemModel::Node*>( data );
|
||||
Lock l( mGitStatusFileCacheMutex );
|
||||
auto found =
|
||||
mGitStatusFilesCache.find( std::string{ model->getNodeRelativePath( node ) } );
|
||||
std::string_view nodePath = model->getNodeRelativePath( node );
|
||||
auto found = std::find_if( mGitStatusFilesCache.begin(), mGitStatusFilesCache.end(),
|
||||
[&nodePath]( const std::string& key ) {
|
||||
return std::string_view{ key } == nodePath;
|
||||
} );
|
||||
if ( found != mGitStatusFilesCache.end() )
|
||||
return Variant( STYLE_MODIFIED );
|
||||
return Variant( STYLE_NONE );
|
||||
|
||||
Reference in New Issue
Block a user