-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Proposal] Const Requests #48
Comments
Hey @JackThomson2 , I don't understand what you mean by this. Constant response as in? |
For example our hello world request is constant as it always response "HELLO WORLD", so in this case, we could save this rust side, meaning we'd only have to call the python function the first time |
@JackThomson2 , but hello world is just an example in our scenario. We definitely require variable response for a web server to exist. Maybe I am unable to understand something but I can't see how a fixed function can be helpful. Won't we still require some sort of python to pass the info? |
It would be a per function opt-in thing, definitely not for every function. |
If it as opt-in what would be the constant part? |
The response of the functions, as I say in the Hello world, we'd just save that. |
An example for this could be returning the static index page etc. If it's always returning index there would be no point checking the python function every time |
@JackThomson2 , I understand your proposal now. I think it will be a good addition and can make the response time faster. Also, I have something in mind that will allow us to use the decorator python syntax with it. |
I also will be implementing static file serving after merging your PR. That will be using native rust only imo. |
@JackThomson2 , is this request relevant after the v0.6.0 release? |
I wonder if we should off an option for a constant response which won't change, this would allow us to never touch python for ultra fast path solutions.
The text was updated successfully, but these errors were encountered: