← Back to team overview

kicad-developers team mailing list archive

Re: Hating wx configuration more than ever...


On 05/08/2012 09:00 AM, Lorenzo Marcantonio wrote:
> On Tue, May 08, 2012 at 08:21:50AM -0500, Dick Hollenbeck wrote:
>> Besides, it gives the computer something to do when it doesn't have anything else to do,
>> which is most of the time.
> You didn't work with mainframes or embedded system it seems XD

We are not working with embedded systems.  We are writing KiCad for computers that have
nothing to do except hope you press a key or move a mouse.

But I've worked in a number of environments, and about half of it embedded.

Embedded software I wrote is used to generate about 3-5% of all the electric power on the
power grid in the U.S. now:


The Grand Coulee Dam is the largest power plant in the Unites States.  We were chosen in
2008 to replace 40 year old technology.   This is the largest power plant in the United
States, of any technology, coal, nuclear or other.  Its the largest power plant in the
U.S. period.

Hi hope this qualifies as some embedded experience, because otherwise I would have a more
difficult time updating my resume.

>> Also, remember that you gain in most circumstances since you probably started with
>> serialized bytes.  Storage (.e.g. disk or network) is mostly a matter of working with
>> bytes.  So this gain tends to balance out the cost you mention with respect to indexing. 
>> We are probably burning more cycles converting to 16 or 32 bit characters in KiCad than
>> the cost of indexing for insertion would cost.
> I specified 'if you aren't only copying them from here to there'. In
> UTF8 moving forward or backward is O(n) complexity instead of O(1)
> because character length is variabile. More like a list than an array.

I agree with this analysis.   But as I run KiCad on wx 2.9.HEAD, it is not perceptibly
slower than on 2.8.

Funny thing.  So I don't think O(n) means much here, the computer has nothing else to do.

So it is not significantly slower, nor did the wx designers think it would be when they
made the choice to use UTF8 inside wxString on linux.

So they agree with me that it is a reasonable way to move forward.  However, I was just
saying that they could have done the whole show using std::string 8 bit, using UTF8, and
did not need the extra wxString wrapper.