flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Mclean <jus...@classsoftware.com>
Subject Re: [7/7] git commit: [flex-asjs] [refs/heads/develop] - make getValue a lot faster - 30ms down to 5ms in a complex app for JS in Chrome
Date Thu, 01 Jun 2017 06:50:30 GMT
Hi,

> What will happen if some of those values will be null ? For example styleable.style ?

Styleable could be I guess but there wasn’t a null check for it before.

Styable.style is unlikely to be null. All test still pass and I’ve tested this with several
applications and it never has a null value and there no code in the framework that sets it
to null that I could see. The code is significantly faster.

In the other case you are looking a property that's likely to be a string /number so it will
exist or not exists, comparing via == or != or if(o) is dangerous as it matches or doesn’t
match all sort of things you may not expect.

But as AS and JS behaves a little differently here it would be good to have a discussion on
how we should treat null/undefined.

Thanks,
Justin
Mime
View raw message