web3infra-foundation / mega

Mega is an unofficial open source implementation of Google Piper.
https://gitmega.dev
Apache License 2.0
175 stars 31 forks source link

[Mono Server] Slow Retrieval of Directory-Related Commit Information #617

Open benjamin-747 opened 2 months ago

benjamin-747 commented 2 months ago

The UI page needs to display commit information related to directories. However, the current process involves recursively traversing the commit history, which significantly impacts performance. An optimization solution is needed to speed up the retrieval of commit data without sacrificing accuracy.

related api: {{mega}}/api/v1/tree/commit-info?path=/third-part/mega

image
benjamin-747 commented 2 months ago

One possible approach could be to implement a lazy loading mechanism similar to GitHub’s, where commit information is loaded after directory.