diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index bbb81977..d043aaa9 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -852,6 +852,9 @@ static size_t WriteFn( void* _data, size_t size, size_t num, void* ptr ) std::string TracyLlm::FetchWebPage( const std::string& url ) { + auto it = m_webCache.find( url ); + if( it != m_webCache.end() ) return it->second; + static bool initialized = false; if( !initialized ) { @@ -884,6 +887,7 @@ std::string TracyLlm::FetchWebPage( const std::string& url ) { response = std::move( buf ); } + m_webCache.emplace( url, response ); curl_easy_cleanup( curl ); return response; diff --git a/profiler/src/profiler/TracyLlm.hpp b/profiler/src/profiler/TracyLlm.hpp index 212f3d13..179e07ec 100644 --- a/profiler/src/profiler/TracyLlm.hpp +++ b/profiler/src/profiler/TracyLlm.hpp @@ -128,6 +128,8 @@ private: std::unique_ptr m_chat; unordered_flat_map m_chatCache; + unordered_flat_map m_webCache; + ImFont* m_font; ImFont* m_smallFont; ImFont* m_bigFont;