art with code

2008-11-14

Filezoo, start of day 5

The plan for day five... I was thinking of doing some user interface work, making the zooming more context-sensitive (i.e. zoom to the part I'm interested in.) Clicking on an unreadable entry should zoom in to the point where you can comfortably read it. Also, thinking of making the scroll wheel, well, scroll and relegate zoom to where the pan currently is.

In addition to that, recursive drawing of directories. Draw recursively until all the directory entries are smaller than the cut-off point. As the total amount of entries drawn per screen can't really exceed 5000 or so (the vertical resolution, she is limited!), the framerate should remain in the 20fps range. And yeah, only 20fps for drawing 10000 rectangles (2 per entry) is pretty pathetic, but one takes what one can get.

I'll try and write a preliminary traversal server as well, it shouldn't take more than an hour...

[edit]
Timed sorting a bit. Sorting an array of 4000 strings in C# took 130 ms for the first time, 60ms for the sorting the already sorted array. Sorting a list of 4000 strings in OCaml took 4 ms, 2 ms for already sorted. Interestingly, sorting an array of strings took 5ms in OCaml, which is more than what it took for the list sort.

Sorting an array of 4000 integers in OCaml took 2 ms, but only 1.08 ms in C#. So, my guess is that the C# string comparison operator is slow and that the integer sorting special case is highly optimized. So if I can do a partial string sort in terms of an integer array, I might get speeds closer to OCaml's 4ms.

No comments:

Blog Archive