mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Search in cache before issuing syscall.
This commit is contained in:
parent
4a957ea41f
commit
81c91a87fc
@ -7388,10 +7388,10 @@ void Worker::CacheSource( const StringRef& str )
|
|||||||
assert( m_checkedFileStrings.find( str ) == m_checkedFileStrings.end() );
|
assert( m_checkedFileStrings.find( str ) == m_checkedFileStrings.end() );
|
||||||
m_checkedFileStrings.emplace( str );
|
m_checkedFileStrings.emplace( str );
|
||||||
auto file = GetString( str );
|
auto file = GetString( str );
|
||||||
if( SourceFileValid( file, GetCaptureTime() ) )
|
// Possible duplication of pointer and index strings
|
||||||
|
if( m_data.sourceFileCache.find( file ) == m_data.sourceFileCache.end() )
|
||||||
{
|
{
|
||||||
// Possible duplication of pointer and index strings
|
if( SourceFileValid( file, GetCaptureTime() ) )
|
||||||
if( m_data.sourceFileCache.find( file ) == m_data.sourceFileCache.end() )
|
|
||||||
{
|
{
|
||||||
FILE* f = fopen( file, "rb" );
|
FILE* f = fopen( file, "rb" );
|
||||||
fseek( f, 0, SEEK_END );
|
fseek( f, 0, SEEK_END );
|
||||||
|
Loading…
Reference in New Issue
Block a user