-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimized streamReadFun() to cache it's read buff
StreamContainer now can hold onto a byte buffer for the streamReadFunc so a new one doesn't have to be alloced for every read op. This had the consequence of requiring us to lock streamReadFunc() on a mutex to remain thread safe since calls to it would be sharing the same buffer. I've seen only modest perf gains on average, a few ms at best. However, there are certain "bad" frames in terms of render times, and those cases saw a pretty good improvement. Since they are not the majority though, it didn't effect the average framerate very much.
- Loading branch information
1 parent
e3a8440
commit 02745ad
Showing
1 changed file
with
38 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters