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

Performance ot fromTable and toTable is very bad #1

Closed
acmeguy opened this issue Oct 10, 2021 · 4 comments
Closed

Performance ot fromTable and toTable is very bad #1

acmeguy opened this issue Oct 10, 2021 · 4 comments

Comments

@acmeguy
Copy link

acmeguy commented Oct 10, 2021

Hello,

The performance of this library leaves a lot to be desired.
I have been optimizing some parts of if (fromTable/toTable) and I'd like to contribute that work.

I've written a toTable function that handles big payloads. The current one does not complete those and takes forever processing fairly-big payloads. (the test that ran here for 5881ms was reduced to 1ms by proper handling)

What is the best way to contribute here?

Regards,

  • Stefán
@badosa
Copy link
Member

badosa commented Oct 11, 2021

fromTable belongs to the jsonstat-suite, a library of independent solutions for specific problems. fromTable (like fromCSV) is more like a proof of concept than anything else as it will only work with the right ordered input. Performance improvements to fromTable are very welcome but not critical (of course, anyone is free to develop her own fromTable function). jsonstat-suite join can also be very improved in terms of performance. Any contribution to join is very welcome.

toTable is a root method belongs to the jsonstat-toolkit and many methods rely on it. It's critical to improve it but it must be done safely: the current toTable interface must be kept exactly as it is.

I've written a toTable function that handles big payloads.

Does it keep the current interface, with all its features and setup options? If so, a pull request would be the right method but, because toTable is critical, I'd need some time to run extensive tests to make sure that this is so.

If your optimizations only affect parts of toTable, please share them with me here to study them and decide what would be the simplest way to reflect your contribution.

@alc32
Copy link

alc32 commented Jul 18, 2023

Is there any news about this contribution?

@badosa
Copy link
Member

badosa commented Jul 18, 2023

Unfortunately, I've never heard of @acmeguy again. In fact, some months ago I developed a new unpublished release of the Toolkit written in modern JavaScript. I did not touch the logic of toTable() waiting to see @acmeguy's contribution.

@badosa
Copy link
Member

badosa commented Apr 8, 2025

@acmeguy @alc32 In version 1.6.0 I've added a new method (Unflatten()) that's more efficient and flexible than toTable().

@badosa badosa closed this as completed Apr 8, 2025
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