MantisBT - Zandronum |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0001956 | Zandronum | [All Projects] Bug | public | 2014-10-11 20:20 | 2018-09-30 23:36 |
|
Reporter | Ijon Tichy | |
Assigned To | Dusk | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | 1.3 | |
Target Version | 1.4 | Fixed in Version | 1.4 | |
|
Summary | 0001956: Clientside ACS calls are bulkier than one would expect bandwidth-wise |
Description | For whatever reason, two clientside ACS calls per tic sends 10KB/s worth of bandwidth. For tracer scripts, which must have the tracer drawing clientsided if they don't want to disconnect everyone online, this is not desirable for any large amount of pellets (like, say, a minigun with realistic fire rates).
If there's any way to minimize the size of these calls, it should be pursued so that weaker connections (people still use dial-up!) can handle online play more easily. |
Steps To Reproduce | 1) Start local testing server with scriptlag.pk3, and cheats on.
2) Open up some network monitoring tool. I used iftop.
3) Join local testing server.
4) give "Pistol Beam"
5) Hold down +attack with the Pistol Beam out.
6) Note the sudden 8KB/s jump. |
Additional Information | I adapted Metroid: Dreadnought's Chroma Storm for this. Hence the FABULOUSNESS. |
Tags | No tags attached. |
Relationships | |
Attached Files | scriptlag.pk3 (247,126) 2014-10-11 20:20 /tracker/file_download.php?file_id=1307&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2014-10-11 20:20 | Ijon Tichy | New Issue | |
2014-10-11 20:20 | Ijon Tichy | File Added: scriptlag.pk3 | |
2014-10-11 20:31 | Dusk | Note Added: 0010510 | |
2014-10-11 21:14 | Watermelon | Note Added: 0010511 | |
2014-10-12 01:28 | Dusk | Note Edited: 0010510 | bug_revision_view_page.php?bugnote_id=10510#r5708 |
2014-10-12 01:36 | Dusk | Note Added: 0010519 | |
2014-10-12 01:37 | Dusk | Note Edited: 0010519 | bug_revision_view_page.php?bugnote_id=10519#r5710 |
2014-10-12 01:37 | Dusk | Note Edited: 0010519 | bug_revision_view_page.php?bugnote_id=10519#r5711 |
2014-10-12 01:47 | Watermelon | Note Edited: 0010511 | bug_revision_view_page.php?bugnote_id=10511#r5713 |
2014-10-12 01:48 | Watermelon | Note Edited: 0010511 | bug_revision_view_page.php?bugnote_id=10511#r5714 |
2014-10-12 01:49 | Watermelon | Note Edited: 0010511 | bug_revision_view_page.php?bugnote_id=10511#r5717 |
2014-10-12 01:49 | Watermelon | Note Edited: 0010511 | bug_revision_view_page.php?bugnote_id=10511#r5718 |
2014-10-12 01:55 | Watermelon | Note Added: 0010521 | |
2014-10-12 01:56 | Watermelon | Note Edited: 0010521 | bug_revision_view_page.php?bugnote_id=10521#r5720 |
2014-10-12 02:00 | Watermelon | Note Edited: 0010521 | bug_revision_view_page.php?bugnote_id=10521#r5721 |
2014-10-12 02:00 | Watermelon | Note Edited: 0010521 | bug_revision_view_page.php?bugnote_id=10521#r5722 |
2014-10-12 02:01 | Watermelon | Note Edited: 0010521 | bug_revision_view_page.php?bugnote_id=10521#r5723 |
2014-10-12 12:59 | Dusk | Note Added: 0010527 | |
2014-10-12 19:54 | Dusk | Assigned To | => Dusk |
2014-10-12 19:54 | Dusk | Status | new => assigned |
2014-10-12 23:41 | Dusk | Note Added: 0010561 | |
2014-10-12 23:41 | Dusk | Status | assigned => needs review |
2014-10-13 19:10 | Torr Samaho | Note Added: 0010572 | |
2014-10-13 19:14 | Torr Samaho | Status | needs review => feedback |
2014-10-19 08:42 | Dusk | Status | feedback => assigned |
2014-10-19 09:44 | Dusk | Note Added: 0010631 | |
2014-10-19 09:44 | Dusk | Status | assigned => needs review |
2014-10-19 16:07 | Torr Samaho | Note Added: 0010634 | |
2014-10-19 16:14 | Torr Samaho | Note Edited: 0010634 | bug_revision_view_page.php?bugnote_id=10634#r5806 |
2014-10-19 19:39 | cobalt | Status | needs review => needs testing |
2014-10-19 19:39 | cobalt | Target Version | => 1.4 |
2014-10-19 19:39 | cobalt | Description Updated | bug_revision_view_page.php?rev_id=5810#r5810 |
2014-10-19 19:39 | cobalt | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=5812#r5812 |
2014-10-19 19:39 | cobalt | Note Added: 0010636 | |
2015-03-16 01:28 | Dusk | Note Added: 0011835 | |
2015-03-16 01:28 | Dusk | Status | needs testing => resolved |
2015-03-16 01:28 | Dusk | Fixed in Version | => 1.4 |
2015-03-16 01:28 | Dusk | Resolution | open => fixed |
2018-09-30 23:36 | Blzut3 | Status | resolved => closed |
Notes |
|
(0010510)
|
Dusk
|
2014-10-11 20:31
(edited on: 2014-10-12 01:28) |
|
Hmm. The arguments are sent as three longs and the map name is sent as a string. We could probably cut down on those.
|
|
|
(0010511)
|
Watermelon
|
2014-10-11 21:14
(edited on: 2014-10-12 01:49) |
|
Interesting its sending the map name, that should be at most a single byte I'm guessing.
|
|
|
(0010519)
|
Dusk
|
2014-10-12 01:36
(edited on: 2014-10-12 01:37) |
|
To cut down on the args, we could send a byte header for them. For each of the three args, let (header >> (2 * arg)) & 8) be 0 if the arg is not sent, 1 if sent as byte, 2 if sent as short and 3 if sent as long.
In the best case this chops off 11 bytes (a common case where args are all 0), at worst it adds one byte if all 3 args are sent and are at least 2^16 (AFAIK a very rare corner case).
|
|
|
(0010521)
|
Watermelon
|
2014-10-12 01:55
(edited on: 2014-10-12 02:01) |
|
I was thinking about what you said there, and I have an idea:
void SERVERCOMMANDS_ACSScriptExecute( ULONG ulScript, AActor *pActivator, LONG lLineIdx, char *pszMap, bool bBackSide, int iArg0, int iArg1, int iArg2, bool bAlways, ULONG ulPlayerExtra, ULONG ulFlags )
Using what you said, arg1/arg2/arg3 can be cut down to 2 bits. Since it's weird to send a byte/short to represent 24 bits, here's a possible idea:
0x00 = no args (don't read a byte for this argument)
0x01 = arg is a byte
0x02 = arg is a short
0x03 = arg is a long
This would require 6 bits total (2 bits per 3 args).
We can also bundle the two booleans into 1 bit each. This is 2 more bits.
Therefore we can put all the header information in 1 byte.
The map can be a byte and reference the map index number, so that saves probably on average 4-5 bytes.
Net inflate: 2 bytes
Net deflate: approx 8-17 bytes (probably 17 a lot when sending 0/0/0 args).
Sounds like a good gain! This should lead to most commands being 8-9 bytes in size, rather than 26-27 that they are now.
|
|
|
(0010527)
|
Dusk
|
2014-10-12 12:59
|
|
Quote
0x00 = no args (don't read a byte for this argument)
0x01 = arg is a byte
0x02 = arg is a short
0x03 = arg is a long
This would require 6 bits total (2 bits per 3 args).
This is exactly what I said in my post. Here's what I have in mind:'http://pastebin.com/kKBspCh8 [^]'
In the best case this would be 9 bytes total should the map be sent as a byte index. |
|
|
(0010561)
|
Dusk
|
2014-10-12 23:41
|
|
|
|
|
The "Beam Pistol" example from'https://zandronum.com/tracker/view.php?id=1956 [^]' doesn't work properly anymore if I apply your patch. For instance, if I use the Beam Pistol on Doom2 MAP01 from the player 1 start the beam doesn't originate from the player body. Did you test this example? |
|
|
(0010631)
|
Dusk
|
2014-10-19 09:44
|
|
|
|
(0010634)
|
Torr Samaho
|
2014-10-19 16:07
(edited on: 2014-10-19 16:14) |
|
The updated patch seems to work with the example wad now, but it doesn't solve the problem: The net traffic is still very high when firing the pistol. I'll have a closer look at what's going on.
EDIT: The influence of SVC_ACSSCRIPTEXECUTE is negligible for the example wad. SVC_GIVEINVENTORY is eating all the bandwidth.
|
|
|
(0010636)
|
cobalt
|
2014-10-19 19:39
|
|
|
|
(0011835)
|
Dusk
|
2015-03-16 01:28
|
|
Since this modified a rather integral CLIENTSIDE feature, if there were any problems, surely we would've heard of them by now.. |
|