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

feat: added repository preview (Issue #5) #42

Merged
merged 4 commits into from
Oct 11, 2021

Conversation

kugiyasan
Copy link
Contributor

I got a first working version, however there are a few points to fix before merging this:

  • There is a one second delay everytime the program scrapes a new page. I think that throwing mpsc::channel and threads to the problem could work, however I'd be glad to hear some other opinions!
  • Files and directories can be easily confused in the preview, I will add a slash at the end of the directories soon, tell me if you have any better ideas (coloring directories with a different color might be another idea).

@Mannan-Goyal
Copy link
Collaborator

Yeah, we think that scraping the repository asynchronously is a good idea. Also, the "/" or color thing both work.
Great Job!

@kugiyasan kugiyasan marked this pull request as ready for review October 9, 2021 20:07
@kugiyasan
Copy link
Contributor Author

I think I'm done implementing the feature!

The only flaw that I know of is that I'm creating a new thread for each request. This shouldn't be a problem during normal usage, and it can be mitigated by the use of a threadpool, however this would require implementing ThreadPool ourselves or using a crate for this. I'll let you guys decide on whether or not import a whole crate just for this sake.

Copy link
Member

@mintbomb27 mintbomb27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the code looks fine as of now, we'll be merging this PR. We'll go ahead and open a new issue for the threads system. You can open a PR for the same, and you may use a crate for using ThreadPool

Thanks a lot for your contribution @kugiyasan !

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

Successfully merging this pull request may close these issues.

None yet

3 participants