1 |
Peter Volkov wrote: |
2 |
> Steve, your example only tests how much time bash takes to parse string. |
3 |
> It's obvious that in quoted strings some expansions could be avoided and |
4 |
> thus bash works faster. |
5 |
|
6 |
Yeah that's all I wanted to get across. |
7 |
|
8 |
> But although ebuilds use bash syntax they are |
9 |
> interpreted not only by bash - the time to parse stings is negligible to |
10 |
> other activities. I have not calculated but made a rough estimation |
11 |
> taking into account the number of ebuilds in the tree. So I think we |
12 |
> have of order of 10^6 string. This means that during merge of all |
13 |
> packages we'll win 10 seconds. I don't think it's worth to consider this |
14 |
> gain. |
15 |
> |
16 |
Agreed; in the context of a build it's not at all significant. It might be |
17 |
in the context of metadata generation. |
18 |
|
19 |
> So in portage tree this is the matter of style. That's said, since |
20 |
> personally I don't have any preference on this style and until there |
21 |
> will be arguments not to use this style I'll start to use full quotation |
22 |
> of the strings. |
23 |
> |
24 |
Thanks for taking it on board :-) |
25 |
|
26 |
> And yes, in pure bash programs possibly this'll make sense. |
27 |
> |
28 |
Yeah; that's effectively what ebuild.sh, combined with all the files it |
29 |
sources, is. (There's quite a bit of code there.) |
30 |
|
31 |
Regards, |
32 |
Steve. |