tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: vi vs. nvi



On Jul 24, 12:20am, tls%rek.tjls.com@localhost (Thor Lancelot Simon) wrote:
-- Subject: Re: vi vs. nvi

| On Wed, Jul 23, 2008 at 09:22:53PM -0400, Jim Wise wrote:
| > 
| > Most embedded applications don't need to include vi.  As for those which 
| > provide enough of a `unix-like' environment for vi to be relevant, I 
| > can't think of a current embedded platform for which 160K is a lot of 
| > space.
| 
| Many wireless routers have 8MB of flash, or even less.  I actually imported
| FreeBSD's "ee" to my local source tree (though I find it fairly repulsive)
| because it was so much smaller than the old vi -- I have a platform which
| is in fact very similar to many of the smaller wireless routers, I need an
| editor (we've repeatedly tried to remove it.  customers have howled.) and
| 100K is a make-or-break difference.
| 
| I'd much rather have vi, but I haven't figured out what to squeeze out
| elsewhere to make it fit.  The current state of nvi makes it ~impossible,
| and for, as far as I can tell, functionality that very few people use.  I
| think its build should be slimmed down by default, or it should just be
| removed.

This is all a red herring. Nvi is not much larger than vi, it is only by
30-40K or so. And most of it is because it contains a copy of the regex
library because traditional regex libraries don't operate on wchar_t.
It only appears to be so big because it sets COPT=-g and that overrides
-O2 and the compiler generates large and suboptimal code.

christos


Home | Main Index | Thread Index | Old Index