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

calculateTree() runs forever if PR has 1000+ files #138

Open
regosen opened this issue Dec 10, 2020 · 5 comments
Open

calculateTree() runs forever if PR has 1000+ files #138

regosen opened this issue Dec 10, 2020 · 5 comments

Comments

@regosen
Copy link

regosen commented Dec 10, 2020

In index.tsx calculateTree() you parseInt the contents of files_tab_counter, but GitHub formats it with a comma (e.g. 1024 -> "1,024"), so parseInt returns the value before the first comma.

As a result, count is always greater than fileCount and we retrigger calculateTree over and over again:

    if (fileCount !== count) {
      setTimeout(this.calculateTree.bind(this), 100)
    }
@berzniz
Copy link
Owner

berzniz commented Dec 13, 2020

Hi @regosen - thanks for reporting. Can you provide a public link to such a PR?

@regosen
Copy link
Author

regosen commented Dec 19, 2020

Hi @berzniz - I haven't been able to find such a public PR yet unfortunately... only private ones.

@regosen
Copy link
Author

regosen commented Dec 20, 2020

That being said, here's a commit with over 1000 additions/deletions, showing how GitHub formats such numbers:

https://github.com/kubernetes/kubernetes/commit/4bf2ef646f5937c2d6eb49093fad15cfe65e7aae

@berzniz
Copy link
Owner

berzniz commented Dec 21, 2020

Thanks @regosen

@keturn
Copy link

keturn commented May 5, 2021

Oh, do you need a PR that touches a thousand files? https://github.com/MovingBlocks/Terasology/pull/4622/files

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

3 participants