[How-to] Use the profiler command to identify problematic scripts

My problem seems to be vrp_mysql, can anyone tell if this is really it? And if so, is there any solution?!

1 Like

The ms of that script is basically the time needed by your DBsql, optimize it and you will fix the ms of vrp_mysql

1 Like

Great Resource

Does it work on Linux?

Is it impossible to fix this random lost fps??

How can I find .Bat file which was saved?

2 Likes

okay… i did a goof… i did a profiler with 50.000 samples… tried to save it, and my game froze, lost about 15GB space on my drive, and at some point it completed(i suspect) and the game shut down(kicked from the server, my own server so no biggie) and i got my 15gb back, any idea what happened to the profile.bin file it saved? i cannot find it on my computer, or the server(server is on linux, but i suspect it should be with the run.sh file)

also, do not use 50.000 samples… game was stuck in limbo for almost 30 minutes when saving it.

EDIT
found it, 2GB of bin file with loads of data, that cannot be opened due to

> Malformed timeline data: Unknown JSON format

this happens regardless of if i make the profile.bin file on my computer, or the server…

Keep the sample size to 500… much more than that and you’ll have problems. It is a pain that the sample size is so small though but it’s still very useful though still.

1 Like

profiler is recording client side but server side is not working anyone know why the profiler not start recording server side ?

1 Like

tried with 100(just for giggles) and still have the Malformed timeline error

server side should work, got it working on a linux server at least… remember to save it or view it(if you can)

currently running under windows and nop … i don’t get any message or file when i try to use all commande

1 Like

start with profiler record 500

then wait for it to complete, use profiler status to see when it says no to recording.

then use profiler save profilename.bin

should save where the server is launched from, or on your local computer under the citizen folder for the game.

though i just heard from a friend, that using profiler view and saving it that way actually works, where using profiler save seems to corrupt it no matter what we try… so maybe use the view command to see the profilers work.

the server must be on local host ??? wtf … i get time warning only with 64 players i need to get from the dedicated server

I would not run this in a production environment.

1 Like

but i need it in product because i get time warning only with lot of player :confused:

Running it should be ok, as long as you keep the number low :smile:

Running this in a live environment with many players will cause a temporary hitch warning on the server when trying to view it.

So I suppose I should say I wouldn’t recommend doing it.

the performance impact is minimal, testing it with players on the server and under load is much better to see where problems come from, having only a small amount of players is much less useful

you’re supposed to use profiler load on another client/server and then profiler view there, not load the .bin file in the chrome profiler

1 Like