Cleanup is going to take awhile, so the site is back up but editing has been disabled.
Showbudget
From HalfLife 2 Knowledge Base
showbudget is a utility within the Source engine that shows how much time Source is spending on each of several tasks. It is primarily a tool for determining the cause of slowness in the game. This article currently focuses on its use for optimizing maps.
Accessing
Showbudget is accessed through the console. You do not need cheats enabled to use it. Open the console and type:
+showbudget
then close the console. There should now be an intimidating display on your screen--this is showbudget. You can use
-showbudget
from the console to gets rid of it.
Meaning
In the upper-right you see some text, about "fps" and "ms". The first number tells you how many frames per second are being drawn (358 in the example picture); 60 or above are usually considered good. The second number is actually a better indicator, telling you how many milliseconds (thousandths of a second) it takes to draw a frame; lower is better. The text is in red when Source thinks the framerate is poor, and green when good.
Next, notice the several bars in the main part of the chart. Each bar represents how long it's taking Source to do something. When those bars are small (to the left), your computer is handling things well. If you see some bars spiking to the right, those are the areas you need to work on. Here is a breakdown of what some of the bars mean:
- Unaccounted
- Mostly other processes on the same computer. Shut down nonessential programs running in the background.
- World Rendering
- World brushes. If this is too high, reduce complexity of your world brushes (see later sections).
- Displacement Rendering
- Displacements. If this is too high, you may need to simplify your displacements (by using a lesser Power setting).
- Game
- As far as I know so far, there's nothing to do about this.
- NPCs
- Not yet investigated. Try experimenting.
- Server Animation
- Not yet investigated. Try experimenting.
- Client Animation
- Not yet investigated. Try experimenting.
- Physics
- Time taken to do physics simulations. If this is too high, use fewer or less complicated physics objects. Whenever possible, use prop_physics_multiplayer instead of prop_physics.
- Static Prop Rendering
- Time taken to draw prop_static entities.
- Other Model Rendering
- Time taken to draw prop_dynamic, prop_physics, and variants thereof.
- Light Cache
- Not yet investigated. Try experimenting.
- Brush Model Rendering
- Not yet investigated. Try experimenting.
- Shadow Rendering
- Probably means the dynamic shadows cast by props.
- Detail Prop Rendering
- How long it takes to draw prop_detail instances.
- Particle/Effect Rendering
- Certain types of special effects use this. Smoke, dust, sparks, and other such may be responsible.
- Ropes
- Obviously, ropes. If this is too high, try reducing the number of segments in your ropes.
- Dynamic Light Rendering
- See the section on Dynamic Lights.
- Networking
- How much processing time is spent doing network tasks. This is not the same thing as lag. If this is too high, you'll need to think about sending less data over the network. This might be covered later.
- Sound
- Due to playing sounds. Sounds are caused by ambient_generic, several types of func_whatever entities, and env_soundscape and kin.
- VGUI
- The HUD, menus, the showbudget screen, etc.
- FileSystem
- Not yet investigated. Try experimenting. Unlikely to have anything to do with the map.
- Prediction
- Not yet investigated. Try experimenting. Probably refers to network prediction on the client side.
- Interpolation
- Not yet investigated. Try experimenting.
- Swap Buffers
- Caused by shaders, and possibly by other things. See the Shaders section.
- AINet
- Not yet investigated, but almost certainly has to do with NPC AI, or AI pathfinding, or both.
- Occlusion
- Not yet investigated. Probably just the cost of Occluders, but perhaps also includes the cost of areaportals. Should not have anything to do with Hints.
- Overlays
- Not yet investigated. Try experimenting. Probably related to info_overlay.
- CLagCompensationManager
- Not yet investigated. Try experimenting. Probably about client-side networking.
- CViewRender
- :Render
- Not yet investigated. Try experimenting.
- 3D Skybox
- Cost of displaying the 3D skybox. Unknown whether this is the total cost, or just the skybox-specific part.
Binding to a key
If you plan to use showbudget a lot, inserting these lines into your config.cfg file will make the j key toggle display of showbudget. You will need to restart the game (or type exec config in the console) before the change will go into effect.
alias showbudget_on "+showbudget; bind j showbudget_off" alias showbudget_off "-showbudget; bind j showbudget_on" bind "j" "showbudget_on"

