Skip to content

Conversation

@schneems
Copy link
Collaborator

There was a concern about the appearance of a 5 second timeout. In my experience this is quite a high limit.
https://bugs.ruby-lang.org/issues/18159#note-7.

When I set the original value I didn't know what performance characteristics we would have and 5 seconds seemed like a large amount of time to recover from slowness.

In practice the times we've had performance issues are due to cases where there are bugs that will either never exit #77 or due to a flaw in some subset of the logic that would otherwise take exponential time to resolve #35. Basically: If we cannot resolve a document in 1 second, there's very little chance we'll be able to figure it out in the next 4. I feel reasonably confident about dropping it down to 1.

The hot path continues to be Ripper and re-parsing the document constantly. However overall it seems very performant. Also I'm keeping an eye on the combination logic as it might come back to be a problem for pathological cases where there are many syntax-errors rather than 1 or 2. At this time, the strategy is to wait for performance issues to occur and then tackle them. It doesn't seem to be a huge problem at the moment.

Moving the performance test to a regression test as all tests must now execute under 1 second or the timeout will cause them to fail.

We can consider introducing some FYI benchmarks, perhaps seeing how many IPS (Iterations Per Second) we can do on one case over 5 seconds. But not gate or fail on it. Just keep it around as an optimization target. But if that's the case, maybe it's fine to wait until do that optimization work.

There was a concern about the appearance of a 5 second timeout. In my experience this is quite a high limit. 
https://bugs.ruby-lang.org/issues/18159#note-7.

When I set the original value I didn't know what performance characteristics we would have and 5 seconds seemed like a large amount of time to recover from slowness.

In practice the times we've had performance issues are due to cases where there are bugs that will either never exit #77 or due to a flaw in some subset of the logic that would otherwise take exponential time to resolve #35. Basically: If we cannot resolve a document in 1 second, there's very little chance we'll be able to figure it out in the next 4. I feel reasonably confident about dropping it down to 1.

The hot path continues to be Ripper and re-parsing the document constantly. However overall it seems very performant. Also I'm keeping an eye on the `combination` logic as it might come back to be a problem for pathological cases where there are many syntax-errors rather than 1 or 2. At this time, the strategy is to wait for performance issues to occur and then tackle them. It doesn't seem to be a huge problem at the moment.

Moving the performance test to a regression test as all tests must now execute under 1 second or the timeout will cause them to fail.

We can consider introducing some FYI benchmarks, perhaps seeing how many IPS (Iterations Per Second) we can do on one case over 5 seconds. But not gate or fail on it. Just keep it around as an optimization target. But if that's the case, maybe it's fine to wait until do that optimization work.
@schneems schneems force-pushed the schneems/drop-timeout branch from 026e5d7 to 2c97593 Compare October 11, 2021 19:36
@schneems schneems merged commit 65b449d into main Oct 11, 2021
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