Closed Bystroushaak closed 5 years ago
This did not prove to be effective.
I've realized that I can cache both versions of the object. I will need to do some perf tests.
Are the operations in _create_intermediate_params_obj() dependent on order?
They are not.
I've attempted another try to cache parameters, but because they are context dependent on previous frame (to add * parent or not), they can't be efficiently cached with current Object() implementation.
Note to future self: Don't try to invent anything smart in code_context and just save it into it externally from _create_intermediate_params_obj().
This issue simply doesn't let me sleep. Literally like five minutes before I fell into sleep, I've realized that cacheing can be probably done in different way, so here is another attempt.
As the creation of the dicts is pretty costly, only place where objects aren't now cached and are frequently created is the
._create_intermediate_params_obj()
method. It would be cool if the intermediate object could be cached too.