-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Optimization #267
Comments
There are some caching logic, but I am not sure they work properly. The main challenge for caching is how to handle images and files. The links for images and files provided by Notion expires in 1 hour. So we need to either regenerate those links every hour (the current approach) or store these files somewhere else (less ideal). |
I think the best solution is to have some lightweight serverless function that regenerates these links on demand. So for the HTML we render, we call our custom API endpoint <img src="https://image-api.com/image-id>
And in the API, we either call Notion API to generate an image link and forward the request there, or if we have generated a link recently then directly return that one. The only problem is that this makes the deployment a bit more complicated, but it does allows us to cache everything simply by checking the last_update_time on every post. |
Ok this is implemented, the deployment process is changed. Redeploy by following the README and let me know if there are any problems. |
Is it possible to optimize this?
If I upload 600 pages the process is taking around 3 hours and most of the time fail
Do not process already created pages for example?
The text was updated successfully, but these errors were encountered: