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

Shrinking the Pixi lockfile by using a hash map #2693

Open
RaphaelMelanconAtBentley opened this issue Dec 11, 2024 · 3 comments
Open

Shrinking the Pixi lockfile by using a hash map #2693

RaphaelMelanconAtBentley opened this issue Dec 11, 2024 · 3 comments

Comments

@RaphaelMelanconAtBentley

Problem description

I noticed that there is a lot of redundancy in the Pixi lockfile.
For instance, there is a unique entry for each package at the end of the lockfile, but then for each environment, the package's source is repeated in full.

Wouldn't it be efficient to use a hash map to assign a small id to each of those unique packages and use that small id in the environments section?
I think this would reduce the size considerably when a project has tons of environments sharing features and solve groups.
Not sure about the slowdowns involved with the extra steps parsing/creating that map.
This could also be done only if a certain threshold of redundancy is met.

Just my two cents.

@baszalmstra
Copy link
Contributor

Yes that would help! But using ids would also make the lockfile less readable which is a big consideration too.

We have some other ideas though to further reduce it though! Especially around getting rid of the list of packages per environment per platform.

@olivier-lacroix
Copy link
Contributor

I agreee readability is most important! Repeated entries will be compressed really well (incl by git) and are unlikely to matter that much?

@RaphaelMelanconAtBentley
Copy link
Author

Yeah, I see the value of readability!
But the duplication also impedes readability IMO.

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