Jump to content
gevious

Emerge rewrite in rust

Recommended Posts

I'm relatively unfamiliar with the portage codebase, but know it's written in Python. I'm a web developer and use Python for writing server side code. Recently I have been intrigued by the rust programming language. I'm considering learning the language but need a good project to help me. I thought that maybe doing a rewrite of emerge would be a project worth considering since rust will be as secure as Python but will run significantly quicker.

 

I'd love to hear if this is something worth doing and if it would be able to help the community in the future.

Share this post


Link to post
Share on other sites

I have no idea on the technical aspects but if emerge can be made quicker then it can only be a good thing as far as I'm concerned.

 

Is Python the real reason for emerge being slow ? What is time consuming is when emerge calculates dependencies. I think so. I perhaps am wrong. If I were right, I would look to Portage tree data structure.

 

Python code could be written in C or C++. Both are close together. Would it be faster, quicker ? That's the question.

Share this post


Link to post
Share on other sites

there is C++ rewrite, called paludis and it's not any faster. A new portage version we testing locally is a bit faster. But last years, indeed, it slowed at some point. From what I understand portage now re-calculates it's dependency tree from scratch each time and depending on pkg list  it can be really discouraging. Maybe, we can make this behavior improved or changed completely. I.e problem is not because portage written in python, but rather in what it trying to do. (too smart?) 

Share this post


Link to post
Share on other sites

there is C++ rewrite, called paludis and it's not any faster. A new portage version we testing locally is a bit faster. But last years, indeed, it slowed at some point. From what I understand portage now re-calculates it's dependency tree from scratch each time and depending on pkg list  it can be really discouraging. Maybe, we can make this behavior improved or changed completely. I.e problem is not because portage written in python, but rather in what it trying to do. (too smart?) 

 

That's what I meant in my previous post. That's the way Portage calculates dependencies.

Share this post


Link to post
Share on other sites

So, the speed improvements will come from better algorithms rather than faster code execution. Doing maintenance work on portage sounds like a good, albeit not-so-glamorous option. Thanks for the input

Share this post


Link to post
Share on other sites

drobbins told me the speed of portage is limited by ebuilds calling bash when i was asking about rewrites in c.  (i thought paludis was c, oops :)  what are you guys doing, caching the dep tree?  im surprised the deps are calculated at all rather than defined within ebuilds?

Share this post


Link to post
Share on other sites

yes, bash is slow too, mainly because of readline library but still. The're several portage rewrites exist. paludis (C++), nix package manager (haskell), maybe others exist too. But they are mainly doing same as portage, i.e their existance dubious from point it's just portage (but in different lang). Devs who doesn't like python, created it without making anything revolutionary.  

Share this post


Link to post
Share on other sites

I would be leery of re-writing an important package management function in a language that (according to wikipedia) is at 1.0.0 Alpha stage.

 

I would be petrified after reading this on their front page

 

 

* In theory. Rust is a work-in-progress and may do anything it likes up to and including eating your laundry.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...