Thanks for the info Loftar
You're clearly working hard
-
jordancoles
- Posts: 14168
- Joined: Sun May 29, 2011 6:50 pm
- Location: British Columbia, Canada
Re: Client performance rant
Check out my pro-tips threadDuhhrail wrote:No matter how fast you think you can beat your meat, Jordancoles lies in the shadows and waits to attack his defenseless prey. (tl;dr) Don't afk and jack off.

-
loftar
- Posts: 9093
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Client performance rant
Just for the record, as a continuation of point 3, if anyone else, unlike me, can get some meaningful GPU profiling to work, I'd be quite interested in any results that may provide, or for a guide on how I can get it to work myself.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
romovs
- Posts: 1472
- Joined: Sun Sep 29, 2013 9:26 am
- Location: The Tabouret
Re: Client performance rant
There is this old and now deceased - gDEBugger which seems to work on Windows 7 x64 with nvidia 4200M but not on Intel. This version in particular v5.8.1 (not an official source. Might be shady.) with latest nvidia driver.
Weirdly a year ago it wouldn't even launch on the same machine, I guess it might be picky towards video drivers version.
Has tons of performance metrics and produces some nice data. Although I haven't played with it much yet...
On Linux I wasn't able to get anything working either except apitrace which might be marginally useful, it's a call tracer but IIRC has a GPU timings graph.
Tried installing Nsight for VS right now. It captures performance analysis, producing some sort of timeline report, but I failed to make anything meaningful from it. The juicy stuff might be in its Graphics Debugging feature which is disabled. Probably c/c++ only.
EDIT:
Ok Nsight is useless. Doesn't work properly with java or maybe just due to GL 2.
gdebugger apparently is not very useful either. Can't inspect on per frame basis and generally buggy and I could make it work with nvidia performance counters. The only interesting things it complained about were:
- High number of glGetError calls. However disabling it on Windows nvidia 4200M and Intel 3000 has zero effect. But on Linux with Intel 530 it leads to 7FPS increase
- Some dud state changing commands but imo none of that should have much effect.
- Really small percentage of vertices out of total drawn with large percentage of batches.
Weirdly a year ago it wouldn't even launch on the same machine, I guess it might be picky towards video drivers version.
Has tons of performance metrics and produces some nice data. Although I haven't played with it much yet...
On Linux I wasn't able to get anything working either except apitrace which might be marginally useful, it's a call tracer but IIRC has a GPU timings graph.
Tried installing Nsight for VS right now. It captures performance analysis, producing some sort of timeline report, but I failed to make anything meaningful from it. The juicy stuff might be in its Graphics Debugging feature which is disabled. Probably c/c++ only.
EDIT:
Ok Nsight is useless. Doesn't work properly with java or maybe just due to GL 2.
gdebugger apparently is not very useful either. Can't inspect on per frame basis and generally buggy and I could make it work with nvidia performance counters. The only interesting things it complained about were:
- High number of glGetError calls. However disabling it on Windows nvidia 4200M and Intel 3000 has zero effect. But on Linux with Intel 530 it leads to 7FPS increase
- Some dud state changing commands but imo none of that should have much effect.
- Really small percentage of vertices out of total drawn with large percentage of batches.
-
loftar
- Posts: 9093
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Client performance rant
That's somewhat interesting. I've left them all in simply because on the systems I've tried on, removing glGetError calls has made no difference (and it is somewhat helpful in some error reports). If that helps on more systems, then it is perhaps a cheap way to increase performance for those people until larger rewrites.romovs wrote:- High number of glGetError calls. However disabling it on Windows nvidia 4200M and Intel 3000 has zero effect. But on Linux with Intel 530 it leads to 7FPS increase
What does this mean?romovs wrote:- Really small percentage of vertices out of total drawn with large percentage of batches.
Thanks for looking into it, btw.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
Amanda44
- Posts: 6485
- Joined: Wed Sep 28, 2011 12:13 pm
Re: Client performance rant
Hey, I can't help you with 'meaningful GPU profiling' ...
... but nice to see you working on client performance and 'hi' ... 
Koru wrote:
It is like in Lord of the Flies, nobody controlls what is going on in the hearthlands, those weaker and with conscience are just fucked.
Avatar made by Jordan.
Animal lovers - Show us your pets! - viewtopic.php?f=40&t=44444#p577254
It is like in Lord of the Flies, nobody controlls what is going on in the hearthlands, those weaker and with conscience are just fucked.
Avatar made by Jordan.
Animal lovers - Show us your pets! - viewtopic.php?f=40&t=44444#p577254
-
romovs
- Posts: 1472
- Joined: Sun Sep 29, 2013 9:26 am
- Location: The Tabouret
Re: Client performance rant
Sorry I should have explained better.loftar wrote:What does this mean?romovs wrote:- Really small percentage of vertices out of total drawn with large percentage of batches.

By batch they refer to vertex drawing functions.
Statistics on the screenshot are per application run. Logged in and stood in a middle of the village for a minute or so.
A more detailed view of the aggregation from the first screenshot.

So essentially, there is large amount of batches (69% out of the total) that draw relatively small amount of vertices each (between 6 to 1728).
Unfortunately it doesn't show the statistics at a frame level nor actual function calls, so hard to make out the specifics from this.
-
Jalpha
- Under curfew
- Posts: 1841
- Joined: Thu Aug 22, 2013 12:16 pm
-
Lizard_Paszczyk
- Posts: 23
- Joined: Sat Jan 07, 2017 4:31 pm
Re: Client performance rant
Did you think to write this game in C++ instead of java? C++ is much faster...
-
loftar
- Posts: 9093
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Client performance rant
That is debatable. It has been like 20 years since Java was slow.Lizard_Paszczyk wrote:C++ is much faster...
But yes, I have considered it from time to time. Besides the prospect of rewriting everything, though, what I'm relying on the most right now in Java is the ability to load and run downloaded code in a platform-independent way, which I don't really have any alternative for in C/C++ that I have found to my liking.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
algorithm
- Posts: 218
- Joined: Thu Aug 13, 2015 2:17 pm
Re: Client performance rant
JavaScript?loftar wrote:the ability to load and run downloaded code in a platform-independent way
algorithm wrote:Cape awarded?
jorb wrote:Oh, for sure. Delivery 2022.