Gentoo Archives: gentoo-portage-dev

From: Emma Strubell <emma.strubell@×××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Fwd: [gentoo-portage-dev] search functionality in emerge
Date: Thu, 12 Feb 2009 21:01:31
Message-Id: 5a8c638a0902121301g1c37cd8dv1dd83d08c44092ba@mail.gmail.com
1 Hi!
2
3 So, my project did result in... something. Nothing too impressive, though.
4 My implementation of search ended up being about the same speed as the
5 current implementation because of the pickle module. I finished my project
6 at the very last minute before it was due, so I didn't have time to find and
7 implement an alternative pickling/serialization module. There must be a
8 faster python pickler out there, though, any recommendations? After I turned
9 in my project I had final exams and then winter break, and I basically
10 didn't want to look at my code at all during that time. Now that you've
11 brought it up, though, I wouldn't mind working on it, perhaps polishing it
12 (okay, it needs more than polishing) so that it might actually be a nice
13 addition to portage? I'm not doing any coding for any of my classes this
14 semester (except for some assembler) so I definitely wouldn't mind working
15 on this on the side.
16
17 The reason why it will need (significantly) more work is because I basically
18 had no idea what I was getting into with the regex search. I implemented $
19 and *, if I remember correctly, and for anything else the search just
20 defaults to the current portage search. I don't know whether implementing
21 regex search with the suffix tree that I used to implement the search would
22 make sense... I'll have to think about it some more. In fact, I have nothing
23 else to do this rainy afternoon :]
24
25 If I can find an unpickler that can unpickle at a reasonable speed, my
26 search implementation would be significantly faster than the one currently
27 in use. I'd show you my code, but I have to admit I'm intimidated by Alec's
28 recent picking apart of Doug's code! For example, I don't even know how to
29 use docstrings... The code probably could be cleaned up a lot in general
30 since I was eventually just trying to get it to work before it was due.
31
32 Thanks for asking, let me know what you think! (Also, sorry, René, for
33 sending this to you twice.)
34
35 Emma
36
37 On Thu, Feb 12, 2009 at 2:16 PM, René 'Necoro' Neumann <lists@××××××.eu>wrote:
38
39 > -----BEGIN PGP SIGNED MESSAGE-----
40 > Hash: SHA1
41 >
42 > Hey,
43 >
44 > has your project resulted in anything? :)
45 >
46 > Just curios about perhaps nice portage additions ;)
47 >
48 > Regards,
49 > Necoro
50 >
51 > Emma Strubell schrieb:
52 > > Hi everyone. My name is Emma, and I am completely new to this list. I've
53 > > been using Gentoo since 2004, including Portage of course, and before I
54 > say
55 > > anything else I'd like to say thanks to everyone for such a kickass
56 > package
57 > > management system!!
58 > >
59 > > Anyway, for my final project in my Data Structures & Algorithms class
60 > this
61 > > semester, I would like to modify the search functionality in emerge.
62 > > Something I've always noticed about 'emerge -s' or '-S' is that, in
63 > general,
64 > > it takes a very long time to perform the searches. (Although, lately it
65 > does
66 > > seem to be running faster, specifically on my laptop as opposed to my
67 > > desktop. Strangely, though, it seems that when I do a simple 'emerge -av
68 > > whatever' on my laptop it takes a very long time for emerge to find the
69 > > package and/or determine the dependecies - whatever it's doing behind
70 > that
71 > > spinner. I can definitely go into more detail about this if anyone's
72 > > interested. It's really been puzzling me!) So, as my final project I've
73 > > proposed to improve the time it takes to perform a search using emerge.
74 > My
75 > > professor suggested that I look into implementing indexing.
76 > >
77 > > However, I've started looking at the code, and I must admit I'm pretty
78 > > overwhelmed! I don't know where to start. I was wondering if anyone on
79 > here
80 > > could give me a quick overview of how the search function currently
81 > works,
82 > > an idea as to what could be modified or implemented in order to improve
83 > the
84 > > running time of this code, or any tip really as to where I should start
85 > or
86 > > what I should start looking at. I'd really appreciate any help or
87 > advice!!
88 > >
89 > > Thanks a lot, and keep on making my Debian-using professor jealous :]
90 > > Emma
91 > >
92 >
93 > -----BEGIN PGP SIGNATURE-----
94 > Version: GnuPG v2.0.9 (GNU/Linux)
95 > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
96 >
97 > iEYEARECAAYFAkmUdZIACgkQ4UOg/zhYFuDRQQCfeVXb6uy+wBSKll4MHq54MiyX
98 > VawAn0TWrTBVKuxAPFWpQMvvO3yED5Fs
99 > =dBni
100 > -----END PGP SIGNATURE-----
101 >

Replies