Skip to content
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

Performance issue with post loading #7

Open
9to1url opened this issue Feb 13, 2020 · 1 comment
Open

Performance issue with post loading #7

9to1url opened this issue Feb 13, 2020 · 1 comment

Comments

@9to1url
Copy link
Contributor

9to1url commented Feb 13, 2020

I have around 500 posts, the server first time startup for the loading of post taking too long time.

Almost take 6 mins to load them. I found a lot of "git log" external process running, each at a time, taking too much time to load.

Any idea how to resolve this?

@meddle0x53
Copy link
Owner

Because it goes through the file system and parses the files, gets some info from the git log, as the author/dates.
I mean if you have so many posts it could be slow on startup. But in a production environment you want be starting it up often?
Otherwise you can resolve it if you use some DB (maybe a plugin to Blogit) as cache - it could be mnesia, postgres, mongo, whatever. You can cache the parsed posts with the metadata in it and update it when a post was edited, renewed.

By default blogit works with a git repository provider, but it is an extendable behavior, so you can write whatever repository for the posts. It can be a new one Git+Cache or just Postgres provider.
I made it highly extensible.

BTW this repository is only the Phoenix view application of Blogit. The core functionality for reading and parsing the posts is here : https://github.com/meddle0x53/blogit

You can even have a terminal view + blogit to have notes and etc. I mean even how you present the parsed posts can be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants