Closed elliotwutingfeng closed 1 year ago
Thank you for your PR! Is there a reason you've marked it as a draft?
Thank you for your PR! Is there a reason you've marked it as a draft?
No problem! This PR currently works, however, the caching of results for unique combinations of commit SHA hash and the ?type=
values would lead to multiple git clone
s for the same SHA hash.
This would get worse if ?exclude=
were to be implemented, which I am interested in working on.
I am thinking of caching results for the SHA hash only, and filtering by language type afterwards (filtering is cheap).
What do you think? ~Or alternatively I'll make this optimisation in a later PR.~
I am thinking of caching results for the SHA hash only, and filtering by language type afterwards (filtering is cheap).
I think that's the right approach, reducing cloning is critical since RAM is quite limited on the VPS machine.
I've reverted the caching to SHA hash only.
Thank you for your PR!
Closes #6
Closes #4
You can choose to count lines only for specific language type(s), by using the
?type=
query string. Languages are to be separated by a comma.For example,
?type=
blank leads to the default behavior of counting lines for all supported languages.Live Demo