mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Avoid caching very large files (that crash the UI and bloat traces).
This commit is contained in:
parent
7e18540f9c
commit
2598b6c517
@ -49,6 +49,8 @@ static bool SourceFileValid( const char* fn, uint64_t olderThan )
|
||||
struct stat buf;
|
||||
if( stat( fn, &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0 )
|
||||
{
|
||||
// Avoid caching very large files (such as those in unity builds).
|
||||
if ( buf.st_size >= 2 * 1024 * 1024 ) return false;
|
||||
return (uint64_t)buf.st_mtime < olderThan;
|
||||
}
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user