mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-14 17:28:07 +00:00
better artifact cache cancellation thread work organization - only do more frequent cancellation scans when in a tick, otherwise sleep
This commit is contained in:
+13
-10
@@ -10308,16 +10308,6 @@ rd_frame(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: [windows] clear pages from working set shortly after startup, many of which will not be needed
|
||||
//
|
||||
#if OS_WINDOWS
|
||||
if(rd_state->frame_index == 1) ProfScope("SetProcessWorkingSetSize")
|
||||
{
|
||||
SetProcessWorkingSetSize(GetCurrentProcess(), max_U64, max_U64);
|
||||
}
|
||||
#endif
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: do per-frame resets
|
||||
//
|
||||
@@ -16563,6 +16553,19 @@ rd_frame(void)
|
||||
U64 frame_time_us = end_time_us-begin_time_us;
|
||||
rd_state->frame_time_us_history[rd_state->frame_index%ArrayCount(rd_state->frame_time_us_history)] = frame_time_us;
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: [windows] clear pages from working set shortly after startup, many of which will not be needed
|
||||
//
|
||||
#if OS_WINDOWS
|
||||
if(di_load_count() < 50)
|
||||
{
|
||||
if(rd_state->frame_index == 15) ProfScope("SetProcessWorkingSetSize")
|
||||
{
|
||||
SetProcessWorkingSetSize(GetCurrentProcess(), max_U64, max_U64);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: bump frame time counters
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user