art with code

2008-11-20

Filezoo, end of day 10 / start of day 11


6am after no sleep, what better time to blog? Image from an old graphics hack I found lying on the hard disk.

Added importance annotations to the methods. The importance annotations are comments like /** BLOCKING */ and state the method's effect on the user interface.

A BLOCKING method has a non-trivial runtime (or at least lacks speed measurements) and is executed during the UI code (draw event handler or the interaction event handlers.) BLOCKING methods need to be profiled and latency-optimized to maintain a responsive user interface. The fewer BLOCKING methods there are, the better. Currently the draw loop and the recursive draw tree generation are BLOCKING, along with traversal cancellation and cache invalidation.

An ASYNC method runs its work in a separate thread from the UI code. The traversal threads and cache tree updaters are ASYNC. ASYNC code should be correct and not cause too much resource consumption that causes UI latency.

A FAST method is trivially fast or uses other FAST methods in a trivially fast manner (i.e. know that it's not going to infinite loop or anything.) A BLOCKING method measured to be fast can be changed to FAST. If a FAST method is called enough that it forms a bottleneck, its state should be changed to BLOCKING.

I also have DESTRUCTIVE and UNIMPORTANT importance levels, DESTRUCTIVE being reserved to filesystem-changing code, of which I have none yet. UNIMPORTANT is used for the profilers and other non-UI code.

Regarding string sorting, String.CompareOrdinal is faster than String.Compare, but not too correct.

Next up, hmm, more performance work in the shape of splitting the BLOCKING parts that touch the disk over to the ASYNC parts. Documentation for dircache.cs. And maybe at some point I can start adding new UI features? Like pretty colorful lines and magic ? Yeees?
Post a Comment

Blog Archive

About Me

My photo

Built art installations, web sites, graphics libraries, web browsers, mobile apps, desktop apps, media player themes, many nutty prototypes, much bad code, much bad art.

Have freelanced for Verizon, Google, Mozilla, Warner Bros, Sony Pictures, Yahoo!, Microsoft, Valve Software, TDK Electronics.

Ex-Chrome Developer Relations.