Client performance rant

Forum for alternative clients, mods & discussions on the same.
User avatar
jordancoles
Posts: 14168
Joined: Sun May 29, 2011 6:50 pm
Location: British Columbia, Canada

Re: Client performance rant

Post by jordancoles »

Thanks for the info Loftar

You're clearly working hard
Duhhrail 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. :lol:
Check out my pro-tips thread
Image Image Image
User avatar
loftar
Posts: 9093
Joined: Fri Apr 03, 2009 7:05 am
Location: Your character database

Re: Client performance rant

Post by loftar »

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
User avatar
romovs
Posts: 1472
Joined: Sun Sep 29, 2013 9:26 am
Location: The Tabouret

Re: Client performance rant

Post by romovs »

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.
User avatar
loftar
Posts: 9093
Joined: Fri Apr 03, 2009 7:05 am
Location: Your character database

Re: Client performance rant

Post by loftar »

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
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:- Really small percentage of vertices out of total drawn with large percentage of batches.
What does this mean?

Thanks for looking into it, btw.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
Amanda44
Posts: 6485
Joined: Wed Sep 28, 2011 12:13 pm

Re: Client performance rant

Post by Amanda44 »

Hey, I can't help you with 'meaningful GPU profiling' ... :P ... but nice to see you working on client performance and 'hi' ... :D
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
User avatar
romovs
Posts: 1472
Joined: Sun Sep 29, 2013 9:26 am
Location: The Tabouret

Re: Client performance rant

Post by romovs »

loftar wrote:
romovs wrote:- Really small percentage of vertices out of total drawn with large percentage of batches.
What does this mean?
Sorry I should have explained better.
Image
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.
Image

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.
User avatar
Jalpha
Under curfew
Posts: 1841
Joined: Thu Aug 22, 2013 12:16 pm

Re: Client performance rant

Post by Jalpha »

Interesting read, thanks for sharing.
Laying flat.
User avatar
Lizard_Paszczyk
Posts: 23
Joined: Sat Jan 07, 2017 4:31 pm

Re: Client performance rant

Post by Lizard_Paszczyk »

Did you think to write this game in C++ instead of java? C++ is much faster...
User avatar
loftar
Posts: 9093
Joined: Fri Apr 03, 2009 7:05 am
Location: Your character database

Re: Client performance rant

Post by loftar »

Lizard_Paszczyk wrote:C++ is much faster...
That is debatable. It has been like 20 years since Java was slow.

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

Post by algorithm »

loftar wrote:the ability to load and run downloaded code in a platform-independent way
JavaScript?
algorithm wrote:Cape awarded? ;)
jorb wrote:Oh, for sure. Delivery 2022. ;)

Return to “The Wizards' Tower”