Tag Info

Hot answers tagged

8

Vertex and fragment shaders run concurrently, not sequentially, and the GPU automatically load-balances between them, so it's not possible to meaningfully assign specific timings like 7 ms for one and 1 ms for the other. However, you can do a simple experiment to measure where the bottleneck lies: set the view-projection matrix to all zeros for all your ...


6

This question might be too general to give an answer that fixes your problem. Before using profilers I would recommend adding 1) Lots of tracing statements to your program and 2) ability to turn on/off features at runtime (including tracing but also things such as textures, culling, using very simple meshes, etc). I've found doing these 2 makes it much ...


3

Have you tried adding your own "profiling" classes - eg a Timing class that you can call before/after key methods, which will log/track start/end/elapsed times. This could expand into tracking down potential problem areas. This should add only a small overhead. You could also have 2 versions a PROD vs PROFILE version so that you can switch to the PROD one ...


2

There are two kinds of data we can profile, at the high level: We can profile the execution of the program itself -- what functions are called when and where, how long they take, and what impact they have on the environment (allocations, locks, threads spawned, et cetera). We can profile what the user is actually doing with the program -- where they are ...


2

Netbeans has a pretty good profiler built in as well and its free! I struggled to get TPTP to work and YourKit always seemed slow. The Netbeans one seemed to be the best of the bunch. Some profilers will allow you to mark points in your code where profiling should start and stop. This can definitely help when measuring performance. However, a really good ...


2

Having username in userstats is redundant. You probably would want to key userstats.id_user and users.id_users. userstats.id_stats as auto incremented would be ok to reference from an npc interaction. Remove Coords from userstats. table: playerLocation id_user | playerX | playerY | levelName 1 | 211 | 105 | myMap2 Remove experience from ...


1

Memory leaks in Unity can occur on several places. But to help you in the right direction, one of the most common leaks in unity would be the Texture/ material leaks Imperfect loops (for, foreach, while, etc) These leaks are often hard to track and can lead to crashes. To properly chase them down you first want to make sure that you have no warning ...


1

When initializing the physics components for an actor within the world, PhysX needs to know about the collision geometry. PhysX either generates this geometry at run time, or loads it from a precooked cache. This link has a more detailed description of this. If unity supports pre-cooking your collision geometry, then this would eliminate the spikes caused by ...


1

Profiling (and adjusting code where necessary). There's different profiling software available (your compiler might provide built-in hooks for this or bring the tools like GCC and MSVC do) that won't require you to actually edit or modify your code just to take measurements. The easiest - and most generic way to do it (which will require modifications of ...


1

Does the same thing happen on other machines or just your dev box? Once I took a break from developing a game and when I came back to it I noticed it was strangely slow, I just updated my graphics driver and it magically sped up, why it was slow in the first place I have no idea.


1

I've had much better success profiling using YourKit for Java. I tried TPTP but it is very painful to use. YourKit also allows for remote connection. If you want a more simplified monitoring solution you can give JConsole a try. This is the bundled monitor program that is distributed with Java.


1

Yeah you have discovered the main problem with most profilers. They profile everything. You can use options to reduce the profiling scope to some key classes or just time very small bits of your code. You should already know what is probably slowing it down, so test that part. It will take some time to hunt down the slow bits, but I find it a lot more ...


1

I highly recommend not to write your own memory allocator. You need a stable, reliable and tested one, with good debugging functionality like corruption detection and most importantly: with reliable statistics. This is not an easy task and has many pitfalls. There are great and easy to utilize ones out there, for instance: Doug Lea Allocator It comes with ...


1

You don't need to implement anything in your game for this data. Tools such as Massif Valgrind can extract all necessary data from the Debug Symbols. You can view the dumps of Massif in Massif Visualizer.


1

Its definitely a question that could sound vague to some ;) But I think I know where you are coming from. You have a million choices for how you could choose to implement this. Some of those choices should revolve around both the target platforms and the overall design goals. Those considerations will break any ties, until you feel comfortable enough with ...


1

Early Z is just a comparison of depths and ditching off the pixel shader. Why don't you compare overall performance with Early Z enabled and then with it disabled (via modifying the depth of your pixel in the pixel shader by a really insignificant value) ?


1

Based on the feature list it seems even nvPerfHUD no longer supports DirectX 9 on Win7, but it is still supported on Vista. This is kind of surprise to me, I though the drivers for Vista / Win7 are almost identical, it would be interesting to know the reason. There is however one post on nVidia forum which mentions "Windows 7 x64, NVIDIA GeForce 8600 GTS ...


1

I have a home-made profiling system that consists of profile-probes that I've injected on a lot of none-inner-loop places in my code. The probes are initially disabled and I just enable the ones that I want to check up on. The system simply throws out the information to a .txt file (or a network stream) that I then use another language to parse the output ...


1

Until we have a few more specifics on your platform/OS/compiler, it's going to be hard to answer, but in the mean time, look at this answer to "In general how often and when should I optimize my code?" for some generic suggestions. Most of these suggestions will work equally well in optimized (release) or non-optimized (debug) builds. (I'll return and ...



Only top voted, non community-wiki answers of a minimum length are eligible