-
Notifications
You must be signed in to change notification settings - Fork 171
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
CuiHelper Json build optimisation. #488
base: develop
Are you sure you want to change the base?
Conversation
Added ability to send UI to the list of players.
Correct me if I'm wrong, but this way we loose In this case every field with default value would be send and it would totally mess up |
The default values will not be sent. |
Oh, my bad |
Hey, this looks interesting but I'm a bit concerned about some of the default value handling. Some such as the AnchorMin/Max you're not sending if the value is set to "0 0" "1 1", however setting those will change the behavior in-game for some reason. Can we test and make sure the variables we're skipping are actually properly being defaulted on the client? The client code doesn't set the default if the field isn't send in most if not all cases. |
I have removed this handling of default values, there may indeed be problems when updating the UI. |
@MrBlue, could you take a look? |
Hey @SkiTee3000 would you mind updating this again? |
updated |
@MrBlue Check It pls |
@SkiTee3000 Update this for new cooldown fixes |
I just did a benchmark, compared to the current implementation in Oxide the json build is 3 times faster and there is 10% less memory allocation. |
This implementation will in any case speed up json serialization and reduce allocations |
@SkiTee3000 |
@MrBlue ? |
@SkiTee3000 Update for #530 |
SteamId Must be a string - https://github.com/Facepunch/Rust.Community/blob/master/CommunityEntity.UI.cs#L275 |
fixed. |
Now I also noticed that this was moved to RawImage 😂 |
As far as I know, they did. But I'm not sure that this is suitable for the UI. This may need to be finalized. But first, it would be good to test what we have now. After this is done you can think about using pools |
I want to apply pooling to a stringbuilder in the ToJson method. |
Json build optimisation.
Added ability to send UI to the list of players.