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

Page unresponsive when loading report of many repos with huge date gap #542

Closed
eugenepeh opened this issue Feb 6, 2019 · 5 comments · Fixed by #596
Closed

Page unresponsive when loading report of many repos with huge date gap #542

eugenepeh opened this issue Feb 6, 2019 · 5 comments · Fixed by #596

Comments

@eugenepeh
Copy link
Member

As per title.

For e.g. If we set up the dashboard demo to show the analysis for period of a year, the page will become unresponsive for a long while (even though most of the actual contributions are within 3 months) which makes it near unusable.

@emer7
Copy link
Contributor

emer7 commented Feb 11, 2019

I'll look into this

@eugenepeh eugenepeh modified the milestones: v1.8, v1.8.1 Mar 2, 2019
@emer7
Copy link
Contributor

emer7 commented Mar 4, 2019

Sorry for the late response

The culprit is from this line of code.
For larger date gap, there will be more commits being pushed to user.commits

v_summary.js:344

        const { date } = commit;
        if (date >= sinceDate && date <= untilDate) {
          user.commits.push(commit);
        }

Just a quick thought, I am thinking of asynchronous implementation.

@eugenepeh
Copy link
Member Author

hmm, can we do away with empty commits as a whole?

@emer7
Copy link
Contributor

emer7 commented Mar 7, 2019

hmm, can we do away with empty commits as a whole?

If I understood correctly, merging the empty commit become 1 big empty commit?

If yes, I think it could be done, it will need change to how report is generated (empty commit is lumped together. I need to look into how it is done) and also change v_summary.js#getSlicePos

@eugenepeh
Copy link
Member Author

If yes, I think it could be done, it will need change to how report is generated (empty commit is lumped together. I need to look into how it is done) and also change v_summary.js#getSlicePos

Hmm actually what I thought of is that let the commits stores nothing other than non-empty commits.
You can try it out, research on this issue on how can we be more memory/computational efficient and present your findings in your PR.

@emer7 emer7 self-assigned this Mar 14, 2019
eugenepeh pushed a commit that referenced this issue Apr 1, 2019
…e gap (#596)

RepoSense is unresponsive if we load many repos
with huge date gap, making it nearly unusable.

This is caused by the report generated having a lot of
empty commits per day, in which the frontend needs to
sift through to display the report.

Let's fix this issue by removing all those empty commits,
including only commits that are necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants