mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Compress frame images using zstd.
Memory usage and trace load times: !comp 587 MB, 439 ms -> 541 MB, 523 ms (92%, 119%) android-vk 197 MB, 136 ms -> 188 MB, 178 ms (95%, 130%) big2 4463 MB, 2.93 s -> 4198 MB, 3.65 s (94%, 124%) fi 483 MB, 346 ms -> 416 MB, 409 ms (86%, 118%) fi-big 3307 MB, 3.15 s -> 2985 MB, 3.53 s (90%, 112%) large 19.74 GB, 10.05 s -> 19.28 GB, 11.16 s (97%, 110%)
This commit is contained in:
@@ -24,6 +24,10 @@
|
||||
#include "TracyThreadCompress.hpp"
|
||||
#include "TracyVarArray.hpp"
|
||||
|
||||
|
||||
struct ZSTD_CCtx_s;
|
||||
struct ZSTD_DCtx_s;
|
||||
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
@@ -444,7 +448,7 @@ public:
|
||||
const FailureData& GetFailureData() const { return m_failureData; }
|
||||
static const char* GetFailureString( Failure failure );
|
||||
|
||||
void PackFrameImage( char*& buf, size_t& bufsz, const char* image, uint32_t inBytes, uint32_t& csz ) const;
|
||||
void PackFrameImage( struct ZSTD_CCtx_s* ctx, char*& buf, size_t& bufsz, const char* image, uint32_t inBytes, uint32_t& csz ) const;
|
||||
const char* PackFrameImage( const char* image, uint32_t inBytes, uint32_t& csz );
|
||||
const char* UnpackFrameImage( const FrameImage& image );
|
||||
|
||||
@@ -720,6 +724,8 @@ private:
|
||||
size_t m_frameImageBufferSize = 0;
|
||||
char* m_frameImageCompressedBuffer = nullptr;
|
||||
size_t m_frameImageCompressedBufferSize = 0;
|
||||
struct ZSTD_CCtx_s* m_fiCctx = nullptr;
|
||||
struct ZSTD_DCtx_s* m_fiDctx = nullptr;
|
||||
|
||||
uint64_t m_threadCtx = 0;
|
||||
ThreadData* m_threadCtxData = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user