Skip to content

Expression2 "pacSetKeyValue" update rate is very slow? #1402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Ek-Videogames opened this issue Apr 16, 2025 · 5 comments
Open

Expression2 "pacSetKeyValue" update rate is very slow? #1402

Ek-Videogames opened this issue Apr 16, 2025 · 5 comments

Comments

@Ek-Videogames
Copy link

As of the last update, it seems like every keyvalue updated using the 'pacSetKeyValue' function only updates on a global 1 second interval - which pretty much wrecks alot of responsiveness of timing or rendering or computational stuff controlled with E2.

Is this intentional optimization or a bug, and is there some new setting to alter this that I am missing? Out of curiosity I already tried turning off Pac's E2 update rate limiter to see if that was blocking it, but that didn't work.

  • Just to clarify, I am fairly certain this isn't an issue with the specific chips either, debug output values are updating at normal speed. I can see the values updating in pac3's editor slower. Even ended up making a really basic outfit to double check, which was pretty much just an entity speedometer, still the same 1 second update lag issue.
@thegrb93
Copy link
Collaborator

They are networked functions which can be spammed to disconnect players from the server, so the limiting is necessary, but that seems really slow. You tried pac_e2_ratelimit_enable 0 and that didn't work?

@thegrb93
Copy link
Collaborator

I think this byte limit might be what you're running into since pac_e2_ratelimit_enable doesn't turn it off and it updates every second.

1d338ca

@thegrb93
Copy link
Collaborator

Try increasing pac_e2_bytelimit and see if that helps?

@Ek-Videogames
Copy link
Author

Ek-Videogames commented Apr 17, 2025

I think this byte limit might be what you're running into since pac_e2_ratelimit_enable doesn't turn it off and it updates every second.

1d338ca

Oh... right it is breaking before checking if the convar is false.

Try increasing pac_e2_bytelimit and see if that helps?

Increasing the byte limit to max has improved it somehow, but it's still overflowing - is the "global ID" is something that's included in the byte limit and being sent every time? Because otherwise I don't see how it is still able to overflow so easily from say, 4 keyvalues updating on a 60ms function timer.

Will try to do a bit of testing in more controlled variables to get a better metric of what exactly seems to be going on...

@thegrb93
Copy link
Collaborator

thegrb93 commented Apr 17, 2025

The bytes is computed from the length of 'global_id' + 'key' + 'value', so if you got 64 bytes for those, x4 is 256 bytes, every 60ms is 4266.666 bytes/s. At every 16ms, you'd have 16000 bytes/s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants