You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
delete a reversible stackable values class (#1953)
* delete a reversible stackable values class
The reversible stackable values object was initialized for every endpoint,
however, it is only needed for keeping rescue handlers. The idea is
simple, handlers defined "closer" to an endpoint have higher priority.
That test https://github.com/ruby-grape/grape/blob/master/spec/grape/api_spec.rb#L3215-L3232
demonstrates how it works.
In our project rescue handlers are defined at the top level, so almost every
endpoint keeps the unused object.
The mentioned behavior is easy to achieve with the stackable values object and
the `reverse_each` method. Thus, endpoints keeps less objects and
have less code to be maintained.
Besides that, there are a few other simple performance optimizations.
0 commit comments