rage-rpc icon indicating copy to clipboard operation
rage-rpc copied to clipboard

Unlimited size of data sent

Open ziggi opened this issue 5 years ago • 9 comments

By default ragemp limited to 2^15 symbols for sending through events. This PR removes this limitation by splitting large data to smaller parts.

ziggi avatar Dec 19 '19 10:12 ziggi

Thanks for the PR! Taking a look

micaww avatar Dec 26 '19 15:12 micaww

Code looks great! But I will have to test it once I get home this weekend before I can approve

micaww avatar Dec 26 '19 15:12 micaww

I was about to make a PR for this too 👍. I will run it against our implementation for testing (sizes >100k)

riffy avatar Jan 26 '20 19:01 riffy

thanks for testing @riffy! sorry I haven't gotten around to this one yet. It's a bigger feature than some of the other recent PRs so might take a bit of tweaking to get right

micaww avatar Jan 26 '20 20:01 micaww

very nice, i hope this comes soon

TPDGhost avatar Jan 30 '20 12:01 TPDGhost

So I didn't really got to testing. I tried changing the rage-rpc.min.js and implementing the files provided in src, but I didn't get it to work (maybe I'm just too stupid 😢 ) --> Callback Invoke Error #10 : Unexpected end of JSON string.

Basically I've either implemented it wrong or I found a case where this PR does not resolve the issue in total.

@micaww sorry to push it back to you, but maybe you can test it?

riffy avatar Jan 30 '20 18:01 riffy

Try to install this from my branch (already compiled into dist):

npm install --save github:ziggi/rage-rpc#mypatches

I use it on production without issues.

ziggi avatar Jan 30 '20 19:01 ziggi

@ziggi tried it with the #nolimit branch as mentioned in the PR. But I will try with mypatches

riffy avatar Jan 30 '20 19:01 riffy

Hi @ziggi @micaww , I've ran some tests with the #mypatches branch and it works. Here is some data:

Server -> Client -> Server

Objectlength Calls Correct Wrong Errors
370 50000 50000 0 0
66392 50000 50000 0 0
187221 50000 49999 0 1

The error was due to a timeout.

I couldnt evaluate Server -> Browser quickly but I assume it's okay. Thank you ziggi for this PR. It's also a little bit faster than my implementation (~.5 second per 10k calls). Maybe update PR to the #mypatches branch?

riffy avatar Feb 01 '20 11:02 riffy