Repository navigation
Pre-processing: transitioning Pandas processing to Polars - #1255
Open
EngCaioFonseca wants to merge 6 commits into
Open
EngCaioFonseca wants to merge 6 commits into
EngCaioFonseca wants to merge 6 commits into
Conversation
Signed-off-by: Caio Fonseca <engcaiofonseca@protonmail.com>
Signed-off-by: Caio Fonseca <engcaiofonseca@protonmail.com>
Signed-off-by: Caio Fonseca <engcaiofonseca@protonmail.com>
Signed-off-by: Caio Fonseca <engcaiofonseca@protonmail.com>
Signed-off-by: Caio Fonseca <engcaiofonseca@protonmail.com>
Signed-off-by: Caio Fonseca <engcaiofonseca@protonmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Change Description
Moves the heaviest pandas data processing in 8Knot to Polars 2.0, the main bottleneck on large orgs.
The change is surgical: 6 high-volume sites, with less app code than before. Charts and Plotly are unchanged.
What changed
retrieve_from_cache_plreads the cache straight into Polars (ADBC). The old loader and its other callers are untouched.process_datanow runs in Polars for: new contributors, contributor importance pie, activity cycle, commits over time and commit domains. Each chart converts to pandas once, on the small aggregated result, before plotting.preprocessing_utils: timestamp parsing, interval mapping and date-range filter.POLARS_MAX_THREADS=1matches the single-task workers.Behaviour changes (intended)
invalid tzoffset.Benchmark (real cache data, 1 thread, as in production; pandas = current
devcode)On kubernetes, a contributor chart goes from about 60 s to about 5 s from cache to figure. The gains grow with org size, and peak memory drops by 0.3–1.2 GB per chart.
How it was verified
Generative AI disclosure
Please select one option:
If AI tools were used, please provide details below:
- What tools were used? Claude Opus 5.5
- How were these tools used? Draft, code review, testing.
- Did you review these outputs before submitting this PR? Yes.