Tumgik
#Performance Profiling
blubberquark · 10 months
Text
Wish List For A Game Profiler
I want a profiler for game development. No existing profiler currently collects the data I need. No existing profiler displays it in the format I want. No existing profiler filters and aggregates profiling data for games specifically.
I want to know what makes my game lag. Sure, I also care about certain operations taking longer than usual, or about inefficient resource usage in the worker thread. The most important question that no current profiler answers is: In the frames that currently do lag, what is the critical path that makes them take too long? Which function should I optimise first to reduce lag the most?
I know that, with the right profiler, these questions could be answered automatically.
Hybrid Sampling Profiler
My dream profiler would be a hybrid sampling/instrumenting design. It would be a sampling profiler like Austin (https://github.com/P403n1x87/austin), but a handful of key functions would be instrumented in addition to the sampling: Displaying a new frame/waiting for vsync, reading inputs, draw calls to the GPU, spawning threads, opening files and sockets, and similar operations should always be tracked. Even if displaying a frame is not a heavy operation, it is still important to measure exactly when it happens, if not how long it takes. If a draw call returns right away, and the real work on the GPU begins immediately, it’s still useful to know when the GPU started working. Without knowing exactly when inputs are read, and when a frame is displayed, it is difficult to know if a frame is lagging. Especially when those operations are fast, they are likely to be missed by a sampling debugger.
Tracking Other Resources
It would be a good idea to collect CPU core utilisation, GPU utilisation, and memory allocation/usage as well. What does it mean when one thread spends all of its time in that function? Is it idling? Is it busy-waiting? Is it waiting for another thread? Which one?
It would also be nice to know if a thread is waiting for IO. This is probably a “heavy” operation and would slow the game down.
There are many different vendor-specific tools for GPU debugging, some old ones that worked well for OpenGL but are no longer developed, open-source tools that require source code changes in your game, and the newest ones directly from GPU manufacturers that only support DirectX 12 or Vulkan, but no OpenGL or graphics card that was built before 2018. It would probably be better to err on the side of collecting less data and supporting more hardware and graphics APIs.
The profiler should collect enough data to answer questions like: Why is my game lagging even though the CPU is utilised at 60% and the GPU is utilised at 30%? During that function call in the main thread, was the GPU doing something, and were the other cores idling?
Engine/Framework/Scripting Aware
The profiler knows which samples/stack frames are inside gameplay or engine code, native or interpreted code, project-specific or third-party code.
In my experience, it’s not particularly useful to know that the code spent 50% of the time in ceval.c, or 40% of the time in SDL_LowerBlit, but that’s the level of granularity provided by many profilers.
Instead, the profiler should record interpreted code, and allow the game to set a hint if the game is in turn interpreting code. For example, if there is a dialogue engine, that engine could set a global “interpreting dialogue” flag and a “current conversation file and line” variable based on source maps, and the profiler would record those, instead of stopping at the dialogue interpreter-loop function.
Of course, this feature requires some cooperation from the game engine or scripting language.
Catching Common Performance Mistakes
With a hybrid sampling/instrumenting profiler that knows about frames or game state update steps, it is possible to instrument many or most “heavy“ functions. Maybe this functionality should be turned off by default. If most “heavy functions“, for example “parsing a TTF file to create a font object“, are instrumented, the profiler can automatically highlight a mistake when the programmer loads a font from disk during every frame, a hundred frames in a row.
This would not be part of the sampling stage, but part of the visualisation/analysis stage.
Filtering for User Experience
If the profiler knows how long a frame takes, and how much time is spent waiting during each frame, we can safely disregard those frames that complete quickly, with some time to spare. The frames that concern us are those that lag, or those that are dropped. For example, imagine a game spends 30% of its CPU time on culling, and 10% on collision detection. You would think to optimise the culling. What if the collision detection takes 1 ms during most frames, culling always takes 8 ms, but whenever the player fires a bullet, the collision detection causes a lag spike. The time spent on culling is not the problem here.
This would probably not be part of the sampling stage, but part of the visualisation/analysis stage. Still, you could use this information to discard “fast enough“ frames and re-use the memory, and only focus on keeping profiling information from the worst cases.
Aggregating By Code Paths
This is easier when you don’t use an engine, but it can probably also be done if the profiler is “engine-aware”. It would require some per-engine custom code though. Instead of saying “The game spent 30% of the time doing vector addition“, or smarter “The game spent 10% of the frames that lagged most in the MobAIRebuildMesh function“, I want the game to distinguish between game states like “inventory menu“, “spell targeting (first person)“ or “switching to adjacent area“. If the game does not use a data-driven engine, but multiple hand-written game loops, these states can easily be distinguished (but perhaps not labelled) by comparing call stacks: Different states with different game loops call the code to update the screen from different places – and different code paths could have completely different performance characteristics, so it makes sense to evaluate them separately.
Because the hypothetical hybrid profiler instruments key functions, enough call stack information to distinguish different code paths is usually available, and the profiler might be able to automatically distinguish between the loading screen, the main menu, and the game world, without any need for the code to give hints to the profiler.
This could also help to keep the memory usage of the profiler down without discarding too much interesting information, by only keeping the 100 worst frames per code path. This way, the profiler can collect performance data on the gameplay without running out of RAM during the loading screen.
In a data-driven engine like Unity, I’d expect everything to happen all the time, on the same, well-optimised code path. But this is not a wish list for a Unity profiler. This is a wish list for a profiler for your own custom game engine, glue code, and dialogue trees.
All I need is a profiler that is a little smarter, that is aware of SDL, OpenGL, Vulkan, and YarnSpinner or Ink. Ideally, I would need somebody else to write it for me.
6 notes · View notes
swarmenterprises · 1 year
Text
Swarm Enterprises
Website: https://swarm.enterprises/
Address: San Francisco, California
Phone: +1 (504) 249-8350
Swarm Enterprises: Revolutionizing Decision-Making with Cutting-Edge Technology
Swarm Enterprises is at the forefront of innovation, harnessing the power of swarm intelligence algorithms to redefine the way decisions are made. Inspired by the coordinated movements of natural swarms, these algorithms deliver unparalleled precision and intelligent recommendations. Clients are empowered to embrace data-driven decision-making, resulting in heightened efficiency and superior outcomes.
The company's secret weapon lies in its utilization of machine learning techniques, where massive data sets are transformed into invaluable insights. By training algorithms on both historical and real-time data, Swarm Enterprises uncovers hidden patterns, emerging trends, and subtle anomalies that often elude human analysis. This extraordinary capability allows clients to unearth concealed opportunities, minimize risks, and gain an undeniable competitive edge.
Swarm Enterprises doesn't stop there; they seamlessly integrate IoT (Internet of Things) devices into their offerings, enabling real-time data collection and analysis. These connected physical objects grant clients the ability to remotely monitor and manage various aspects of their operations. This groundbreaking technology not only streamlines proactive maintenance but also enhances operational efficiency and boosts overall productivity.
In a world where informed decisions are paramount, Swarm Enterprises is a trailblazer, providing the tools and insights necessary for success in an increasingly data-centric landscape.
Tumblr media
2 notes · View notes
nygmablog · 2 years
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
— jeon jungkook
6K notes · View notes
nobigneil · 5 months
Text
Tumblr media
400 notes · View notes
dozydawn · 2 years
Text
Tumblr media Tumblr media
Charo performing on The Sonny Comedy Revue, 1974.
710 notes · View notes
emberettee · 17 days
Text
Tumblr media Tumblr media
16 notes · View notes
plugnuts · 6 months
Text
Tumblr media
SOUTH PARK CYBER AU: BEGINNING NEXT
Panels under the cut:
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
33 notes · View notes
tadpolebobatea · 7 months
Text
Tumblr media
Happy birthday to Miss Kururu! Our genre confused idol queen! 
Manifesting some plot for her soon, even Lucy has done more plot stuff than her TwT 
i mean her ability is  really interesting (even if it was mostly set up for a cute AnFuu moment). i think it’s fun it doesn’t work on attraction, just the pose (i had upsetting asexual thoughts about this, more should be made of free will being overwritten. You don’t even need to like girls (yeah i was projecting onto Tella))
(Yes tozuka is too filled with light and joy to go that route but I think about it)
(to me, unchastes previous activation was seeing the users ankles. Repressed Victorian you feel?) 
(you’ve heard me mumble about kururu enough that I think you deserve a drawing)
Timelapse babie 
Me before making this drawing : love kururu, goober
Me while drawing Kururus hair : I’m gonna hurl this girl into the sun. Immediately.
24 notes · View notes
chaosxcrushed · 1 year
Text
Tumblr media
maybe , just maybe , this is aligned with my ask blog’s canon
139 notes · View notes
cryscendo · 1 year
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
kurt hummel in every performance
5x06 - Movin’ Out
Just the Way You Are - Kurt Hummel, Blaine Anderson, Rachel Berry, Sam Evans, and Santana Lopez
“Sam, that's ridiculous. You don't need to lose ten pounds.”
“Yeah, Sam, we all agree. You don't need to be prison-camp skinny to be a model. I think you should find another agency.”
48 notes · View notes
58local · 6 months
Text
Tumblr media Tumblr media Tumblr media
Deep Cut - Splatfest Mar '24
f2u gifs please just credit me! ♡
19 notes · View notes
feeshies · 4 months
Text
i know someone like me can't afford to be too picky when it comes to dating, but i think i developed a new dating profile pet peeve and it's:
when someone writes like they're already assuming the worst of you and now you have to prove them wrong
11 notes · View notes
ritahayworrth · 7 months
Text
anyway grace kelly in high society (1956) is actually good. while as far as she is from being a Comedienne™, she totally could have become one if she had had the chance to. like isolating her performance, her tracy is charming and funny, and i think her spin on tracy works and she is able to make it her own especially when you consider that tracy was originally written specifically with kate in mind. its just totally undermined by the fact that when unavoidably you compare the film as a whole to the 1940 version, the film is just not as good because the pacing of high society is horrible, and really just feels like they just cut and pasted the quippiest lines from the original and added some cole porter songs in between. and then of course there is bing crosby...........
9 notes · View notes
drinkingdeadpeopletea · 7 months
Text
i really came out of that episode mostly just going "yayyyyyyyyyy elaborate ritual execution yayyyyyyyyyy!!!!!"
15 notes · View notes
theridgebeyond · 3 months
Text
in a kinder universe, Biden right now is preparing for a peaceful retirement with a skilled successor to carry the torch after saving the nation from another four years of trump back in 2020
3 notes · View notes
angrybatart · 1 year
Text
Tumblr media
Something I'm working on for a comic.
27 notes · View notes