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
First, I want to say thank you for awesome framework.
I have been working around the framework and I see that in response() function, whenever you call it, it create a new object from Response class.
I don't think it's really needed since in one life cycle of a HTTP request, we need only one object of Response
response_instance() time : 0.28365898132324 ms
response() time : 2.3586940765381 ms
It's much more faster than create new object every time you call the function
So I think we better create only one instance for these types of variables, example Request, Cache, ...
The text was updated successfully, but these errors were encountered:
First, I want to say thank you for awesome framework.
I have been working around the framework and I see that in
response()
function, whenever you call it, it create a new object fromResponse
class.I don't think it's really needed since in one life cycle of a HTTP request, we need only one object of
Response
I create a
response_intance()
function:I also tested the performance:
and the result:
It's much more faster than create new object every time you call the function
So I think we better create only one instance for these types of variables, example
Request
,Cache
, ...The text was updated successfully, but these errors were encountered: