Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
0.8.6 and git - Stutter points / Profiling / Code Optimization

#1
Hi All

Has anyone built ops around benchmarking the darkplaces or Xonotic codebase?

I stumbled on Optimizing my game so it runs on a potato where a Godot game dev details things he did to get his fps up from 15 to over 100 fps...

Was thinking that I should just plain profile the code, and maybe take a bash at it, maybe one of those tips (like randomizing the times at which bots do their path calculation - if its not done already) - maybe there's still some scope for improvement?

Does anyone have any tips / are there any existing profiling scripts or documentation, specifically aimed at programming?

I noticed that darkplaces has a "make profile" option, but that's as much as I could find, without diving into doing it myself... (nothing on any related issue trackers)

(I'm not talking compilation flags like here https://forums.xonotic.org/showthread.php?tid=3178)
Reply

#2
Wow, that was too easy.

Code:
$ make profile $ ./darkplaces-sdl -xonotic -basedir /usr/share/xonotic/ # proceed to play a packed server with some say annoying sound effects ;-) (Jeff & Julius Resurrection Server :P ) # that gets you gmon.out $ gprof darkplaces-sdl gmon.out > gmon.txt $ head -32 gmon.txt   %  cumulative  self              self    total          time  seconds  seconds    calls  s/call  s/call  name    20.05    132.88  132.88  3168772    0.00    0.00  CLVM_ExecuteProgram 10.59    203.09    70.21 70352770    0.00    0.00  Mod_CollisionBIH_TraceLineShared   6.13    243.75    40.66 698051575    0.00    0.00  CSQC_Think   4.59    274.17    30.42  1029143    0.00    0.00  Mod_Skeletal_AnimateVertices_SSE   3.23    295.59    21.42 50805973    0.00    0.00  RSurf_PrepareVerticesForBatch   3.13    316.32    20.73  1068728    0.00    0.00  R_DrawModelDecals_FadeEntity   2.54    333.16    16.84 54078747    0.00    0.00  Mod_CollisionBIH_TracePoint   2.23    347.91    14.75  191770    0.00    0.00  R_DrawParticles   1.91    360.56    12.65 392409904    0.00    0.00  Mod_Mesh_IndexForVertex   1.79    372.41    11.86 701891127    0.00    0.00  PRVM_EnterFunction   1.76    384.08    11.67  556380    0.00    0.00  R_DrawModelDecals_Entity   1.43    393.53    9.45 77324176    0.00    0.00  R_GetCurrentTexture   1.32    402.30    8.77 35884921    0.00    0.00  R_SetupShader_Surface   1.29    410.85    8.55  367438    0.00    0.00  Con_DrawNotifyRect   1.21    418.87    8.02  1561806    0.00    0.00  R_DrawParticle_TransparentCallback   1.17    426.65    7.78 701893234    0.00    0.00  PRVM_LeaveFunction   1.13    434.16    7.51 698050749    0.00    0.00  CSQC_Predraw   1.09    441.39    7.23  7877702    0.00    0.00  R_DrawModelSurfaces   1.03    448.21    6.82 88624154    0.00    0.00  Collision_TraceLineBrushFloat   0.83    453.73    5.52 431065778    0.00    0.00  _R_CullBox   0.73    458.60    4.87  2481035    0.00    0.00  CL_NewParticlesFromEffectinfo   0.67    463.02    4.42  483579    0.00    0.00  R_Q1BSP_RecursiveGetLightInfo_BSP   0.66    467.40    4.38  199499    0.00    0.00  R_View_WorldVisibility   0.65    471.73    4.33  191772    0.00    0.00  R_MeshQueue_RenderTransparent   0.65    476.05    4.32  7668008    0.00    0.00  Mod_CollisionBIH_TraceBrush   0.64    480.32    4.28 105853490    0.00    0.00  R_Mesh_TexBind   0.63    484.50    4.18  192314    0.00    0.00  MVM_ExecuteProgram   0.62    488.62    4.12  198828    0.00    0.00  CL_UpdateWorld   0.52    492.10    3.48 171533803    0.00    0.00  Font_GetKerningForMap   0.52    495.54    3.44 10835766    0.00    0.00  DrawQ_String_Scale #https://github.com/dagelf/darkplaces/blob/profiling-tests/gmon.txt
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to understand darkplaces source code wiefie 23 26,260 06-08-2024, 11:40 AM
Last Post: dagelf
  Source code for Peach Mod daveblanchard 4 5,279 03-30-2021, 10:34 AM
Last Post: LegendGuard
  Xonotic Git Help Molnija 4 8,050 01-20-2019, 11:38 PM
Last Post: Molnija
  [SOLVED] setting proper git pushurl BuddyFriendGuy 0 3,543 04-07-2015, 09:44 PM
Last Post: BuddyFriendGuy
Exclamation git branch archival TimePath 2 7,628 02-08-2015, 03:01 PM
Last Post: Mr. Bougo
  Cloning git? end user 2 5,189 09-15-2014, 03:35 AM
Last Post: end user
  Segmentation fault @ Xonotic(git) Ari 2 6,079 01-31-2014, 02:45 AM
Last Post: Ari
  Altering Xonotic Source Code perljamz10 7 17,204 02-26-2013, 06:19 PM
Last Post: Mr. Bougo
  Question and Rant on the LG and MG changes. GegoXAREN 5 7,805 11-26-2012, 04:16 PM
Last Post: hutty
  GIT version size maxyan 7 9,190 03-13-2012, 02:54 AM
Last Post: tZork

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-