skrub-data / skrub

Prepping tables for machine learning
https://skrub-data.org/
BSD 3-Clause "New" or "Revised" License
1.22k stars 97 forks source link

Faster svg viewbox computation in tablereport #1138

Closed jeromedockes closed 1 week ago

jeromedockes commented 1 week ago

The way the computation of the correct viewbox for the plots is done currently is slow when there are many columns. This makes all the bounding box computation in one go with no changes to the document in between to avoid unnecessary recomputations of the styles and layout

also as it adds a few functions to the report code, now is a good time to put it in a module to avoid polluting the global namespace so this PR adds that too

jeromedockes commented 1 week ago

thanks @GaelVaroquaux . the computation of bounding boxes in the browser has not been released yet so I did not create a changelog entry but I added this pr's number to the entry about improving the svg text

jeromedockes commented 1 week ago

I marked it as draft because @Vincent-Maladiere agreed to check it works in a different environment so we should wait for that info before merging

jeromedockes commented 1 week ago

thanks a lot!