Skip to content

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented Feb 7, 2017

This makes the parser work with buffers containing thousands of frames.

Fixes #990.

cc: @Nibbler999

@lpinca lpinca changed the title [fix] Prevent the parser from triggering a stack overflow Prevent the parser from triggering a stack overflow Feb 7, 2017
This makes the parser work with buffers containing thousands of frames.
@lpinca
Copy link
Member Author

lpinca commented Feb 7, 2017

It seems to be slightly slower on a couple of benchmarks, not sure why.

Before:

ping message x 1,447,412 ops/sec ±1.53% (83 runs sampled)
ping with no data x 14,451,215 ops/sec ±0.86% (84 runs sampled)
close message x 12,488,814 ops/sec ±0.91% (87 runs sampled)
masked text message (20 bytes) x 886,571 ops/sec ±1.71% (90 runs sampled)
binary data (125 bytes) x 1,263,534 ops/sec ±1.06% (89 runs sampled)
binary data (65535 bytes) x 289,829 ops/sec ±1.20% (88 runs sampled)
binary data (200 KiB) x 111,717 ops/sec ±0.79% (90 runs sampled)
binary data (1 MiB) x 18,408 ops/sec ±1.45% (86 runs sampled)

After:

ping message x 1,430,195 ops/sec ±0.77% (86 runs sampled)
ping with no data x 11,501,751 ops/sec ±1.03% (88 runs sampled)
close message x 10,360,093 ops/sec ±0.80% (89 runs sampled)
masked text message (20 bytes) x 881,880 ops/sec ±1.24% (88 runs sampled)
binary data (125 bytes) x 1,274,296 ops/sec ±1.05% (89 runs sampled)
binary data (65535 bytes) x 281,736 ops/sec ±0.93% (91 runs sampled)
binary data (200 KiB) x 110,382 ops/sec ±0.83% (88 runs sampled)
binary data (1 MiB) x 19,236 ops/sec ±0.33% (91 runs sampled)

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

Successfully merging this pull request may close these issues.

2 participants