KVP function causing high MS response time, 0.01 - 2.6+

GTA V version? 1.0.260.1
**Up to date?**No
Legit or Pirate copy? Legit
**Steam/CD/Social Club?**EGS/Social club
Windows version? 10.0.19042 Build 19042

Did you try to delete caches.xml and try again? yes
Error screenshot (if any)/
System specifications 1600x 1070 16gb ram
What did you do to get this issue? Devs of the server worked out its a new line of code causing my GM to spike, happens to one other person too.
**What server did you get this issue on?**Hashiriya
CitizenFX crash zip filenot a crash
CitizenFX.log file /
.dmp files/report IDs/

If an issue with starting:
GTA V folder screenshot/
GTA V/update/x64/dlcpacks screenshot/
Filepath to FiveM folder/
FiveM client folder screenshot/
Which antivirus/firewall software are you using?/
Did you try to disable/uninstall your Anti-virus?/

Also add what you already tried so far./

Basically (this will mostly be coming from the script’s dev as I have no clue)

He also states that this is an issue with my FiveM and its something that he cannot fix on his end. Code-snippet ms is mostly between 0.0 and 0.04ms and sometimes it goes up to 1.5ms / 2.0ms, but in one report it went upto 24ms.

Citizen.CreateThread(function()
while true do
Citizen.Wait(1000)
SetResourceKvpInt(‘a_test_1’, 123)
end
end)

I’m not the other person with this issue, however it does seem to be rare
(i’ll most likely just be screenshotting the replies to show him as i know nothing about coding haha)
In game effects: Lag/ms spikes/stuttering when driving making it unplayable.
Issue: FiveM native reference

Hello, this is a friendly reminder because this is your first time creating a topic (or it has been a while since your last topic) in this category.

Please note that most of the support is provided by the Cfx.re community on a voluntary basis. We ask you to be patient; there is no guarantee we have a solution to your problem(s). To avoid unnecessary/duplicate topics, please browse the forums before creating a topic.

To improve your chances of your issue(s) being solved, please provide as much information as possible about the issue(s) you are having. Also —whenever possible— please use the template given to you when creating a topic.

Thanks for keeping these forums tidy!
:mascot:

1 Like

Why would you use SetResourceKvpInt every second?

You must see KVP like a database, would you insert/update very second the same query?

they say its used to track and log distance driven, as you drive it updates every meter to track in KM how far the players drive, and its used to store the data for distance driven to achieve the server made daily goals for money etc (Drive 10km for 175,000 yen) It works fine for everyone else within the server but for some reason for me theres a response time delay which just freezes my game every few frames. The point is this shouldn’t happen and its just my client (and one other) doing so.

1 Like

KVP writes are synchronously writing to disk to ensure consistency if a PC crashes, this could be slow if other I/O on the same disk is blocking (like on a HDD or such).

It might be possible to move these off-thread in batches but then if the game crashes it could be more likely that some writes end up missing, as is the usual trade-off to make with regards to data consistency.

1 Like

ah thank you, I passed that info along. Are you able to shed any light on why its only two of us that have this issue? has it come up in the past for you guys? Our scripts dev is going to try to create a work around but it basically just means us two are at a big disadvantage when it comes to earning money/rewards in the game mode haha

I’m guessing you two have Windows (or your user profile) on a HDD?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.