paypal / paypalhttp_ruby

MIT License
6 stars 38 forks source link

remove OpenStruct usage #2

Open glaszig opened 4 years ago

glaszig commented 4 years ago

this pr removes OpenStruct from runtime logic.

OpenStruct defines methods at runtime and by that invalidates the global method cache which can impose quite a significant performance penalty as demonstrated here and there. this is critical using it in larger rails applications, for example.

there have been patches proposed (9262, 8426, 7816) to mri but as far as i can see no real progress was made.

also, this reddit thread is quite insightful with comments as recent as 1 year ago.

glaszig commented 2 years ago

hello?