Windows 7 and CRiSP Performance Sunday, 29 September 2013  
Pierre was complaining about an issue with CRiSP on his Windows 7 box. When he maximizes the screen, CRiSP became unusable. I think I have fixed it.

We exchanged a number of emails to try and focus on where the problem was. I couldnt reproduce it at first - nothing obvious.

Eventually I maximized my Win7 VM window, ran CRiSP at full screen, and watched the perfmeter CPU graph. It was interesting, because at full screen, CRiSP was using around 15% of a CPU. Normally this would be unnoticeable, but 15% is far too high, especially if you are not doing anything.

CRiSP was developed originally on a 16MHz 80286 CPU. Over the years, CPUs have become hundreds of times faster, and although CRiSP now does more - 15% of an i7 CPU is "strange".

In the end we narrowed it down to the Hex/Ascii "codes" panel on the status bar. 10 times a second, the macro updates this panel. If I ramp this up to 50x, then CRiSP would eat 50% of the CPU. Very strange, but at least I had narrowed it down.

I spent a while putting in probes and trying to figure out where the performance is - somewhere in the display code. The more times that macro triggers, the more work CRiSP has to do. Equally, the larger the rows*cols of the screen, the more work to do. But, the problem was never in the area I was expecting.

Eventually, I narrowed it down to the "dotted" current line box, drawn around the current line, to make it stand out. Although it is the same code on Linux (X11) and Windows, on Windows, the code is slightly perverse (using an API function called LineDDA). LineDDA is a horrible function. It calls a callback function for each pixel to be drawn, which is great if you want fine degree of control, but a performance hog when dealing with anything more than a trivial number of dots to draw.

I replaced the call (after a quick search) with some different code, and now the performance is compatible with X Windows and CRiSP no longer shows up as a problem.

Whilst doing all of this, I found something really strange - and its difficult to know what it is. If you watch the Task Manager/Performance view, it will show you the CPU time used. If your machine is idle, you expect it to be a small number. I would build crisp and run it. CPU will hover around 1-2% and all is good.

Under some circumstances, the system is showing 34% CPU use but nothing is attributed to actually using the CPU. No process in the task manager and nothing in the Resource Meter. This can go on for 5-10 mins. (I have been having internet connection issues today, so it is possible that some service is blocking on the broken internet, and keeps the graph abnormally high). Its not just task manager - but the fan on my laptop is running hot whilst this happens.

Its annoying because it means I cannot take any performance benchmarks whilst this ghost performance issue is there.

Many times in the performance monitor, I see periods of idle, followed by nice bell-curves of CPU usage, even when I am not using the system. I get 3 or more consecutive bell curves as the CPU use rises, then falls to zero.

Other times, like now, the performance is flat at 33-34%. I am assuming that kernel time - e.g. buffer caching or internal kernel page flushing is the root cause here.

Just had a quick play with perfmon - a good tool - lots of detail, even too much, but nothign obvious strikes there.

This is a single CPU VirtualBox VM, so its possible that something strange is happening in the guest interaction that isnt visible on a real Win7 host.

Posted at 17:55:05 by fox | Permalink
  Is Apple insane? Friday, 20 September 2013  
My ipad just got updated to iOS7. Wow. Is it bad.

I thought the Windows 8 metro interface was designed by a child for a blind person. The Apple interface was designed by a color blind person for a pet rabbit.

I think thats what it is.

Using my ipad mini - all 8" of it at 1024x768. And the music player app is the worst I have ever seen on any device. Oh look! It shows me all of 6 lines of playlists out of my maybe 100 playlists. Thats really useful.

I thought SunOS 4.0 and 4.1 was a poor GUI - the earliest of color CRT displays and GUI interfaces was in black and white. It was so difficult to find color.

What does the iOS7 interface look like? Yep. Black and white. All the color and color hinting has gone.

Actually I am really glad they did this to iOS7. I dont care what the specs of the next ipads are - I will have zero interest in ever wanting them.

Next up. Video player. The iOS video player is the least functional and confusing and functionally useless player of any player on any platform. (If you havent used MX-Player on Android, then please do. Its interface and usability is acutely brilliant, especially on small devices). Whats up with the video player?

Total lack of any feedback about what the new layout and controls do. So, the moved the long-dashed-line interface to be on its own on the bottom left. White on gray background. WTF is it? Hm. Nope. Still dont know what it is. (I am kidding - I will work it out eventually). And the teensy-weensy controls in black on the bottom of the screen.

Actually the bottom of the screen is so much better than the top of the screen. Black on gray! Yippee. So I cant even read some text that was up there, and I am left guessing.

They swapped the movies with tv-shows around. Why? And the tv-shows is far worse than the poor interface from before.

I mean - please add functionality - dont remove and obscure with an interface which a rabbit would find confusing.

Do I have anything nice to say? No. There is nothing in the interface which is attractive or desirable, and the only 2 or 3 apps I use the device for have an appalling interface.

Android has its warts (Hello "Settings" - which suffers from the same, how few options can we put on a high res screen approach as well).

The music player might be understandable on an iphone. The iOS6 music player was a downgrade from iOS5 (at least iOS6 would show the cover art as default and some semblance of color but I really disliked the iOS6 interface; iOS7 really trumped that).

I am looking at the music player again. WTF is that control in light gray on a light background under the time? Oh! Its the position indicator. With a 1-pixel wide position indicator. And unreadably small font. (Yes, I can likely change it in settings. But the fonts are inconsistent - nope the settings dont work).

Its incredible! I would, honestly, rather now switch to Windows 8. I am really looking forward that Microsoft stand a good chance.

Now I need to go search google to find how to access the multitasking feature.

Oh! Another one! Safari. ESPN, Disney and Yahoo - three sites I would never have a use for on the home screen. After some fiddling I found out how to delete them. But WTF. Is color being rationed at Apple? Are useful and aesthetic icons banned due to the economic crisis? The Book icon is one that I am really good with a bitmap editor and if called to draw one within 5s, whilst munching on a chocolate bar without my glasses on. Cloud? "+". I *do* like the bookmarks - a small font so it fits them in. But why is that on the right now, instead of the left. Safari - as good as it always was. Which is why I prefer Dolphin or Opera.

It really is a sad show. And the worst thing here is that it took Apple, what, 10y to refine the interface and make it attractive, and we may have to wait another 10y to get something new and desirable.

Posted at 23:18:33 by fox | Permalink
  Apple and Microsoft Saturday, 14 September 2013  
Thought I would offer some opinion on this weeks news, as I see it. My thoughts are mostly worthless, so this blog entry is between me and CRiSP (where I am composing it!)

Firstly, Apple. Sorry. I got bored. As someone who has a fair amount of Apple kit, and like it - the iPhone 5C/5S have only one real attribute: boring. Apologies. Make that two: vastly vastly expensive. I am still waiting for a 128GB iPod, which by now should be 256GB with Moore's Law and competition. But we got a headline figure of $99 for an iPhone 5C and a realistic price of 459GBP off contract. Sorry. But for that money, I would be buying a Galaxy Note III (which, too, is overpriced but the price will drop, and at no, they dont do 128GB either). 64-bit ARM on the iPhone 5S? As a geek, err...what?! That spells fragmentation, and is not a headlining item when the phone has 1GB of RAM (or does it? because they didnt say).

Microsoft + Nokia: I wont willingly pay for Windows 8 or 8.1 or the Surface (ARM or Intel). Well, I would buy a surface if the price was around $100. Look at the Nexus 7 - the "breaking" price needs to approach 100GBP or $150 to be a "no-brainer" purchase. The tablet market has moved really quickly, but quad-core or more - theres nothing you can do with that CPU power. 2+GB of RAM - yes, you can do something with (faster app switching). After the debacle of Windows Mobile devices and OS's, I would never touch such a thing again. When the Windows Phone came out (is that Win7 or Win8?), I thought there was one true great thing MS could do to dominate Apple and Android: give the phones away for free. Seriously, drop $1-200 on every purchase, and they would/could gain huge market share. Poor Nokia.

So, this week MS do a truly great thing: offer to buy your iPads. But not the iPad 1, and only a $200 discount against the iPad 2-4. You can get much better than that from eBay or Amazon. Why would you do it? My iPad 1 is seriously useless - too little RAM, no apps or OS upgrades and only suitable for watching movies. It doesnt multitask or do multiwindow - its too RAM constrained. Its almost useless. Having invested in the device when it came out, I would trade it in for a Surface device. But I could buy two Nexus 7's and keep the iPad compared to the discounts MS is offering. Instead of seeding "early adopters" they are doing that "smile" at people - the "smile" where people give a false smile, whilst helping themselves to your wallet.

Sorry - but its ineffectual. So, no, I dont ever want a Windows phone or a Surface device or a Win8 or Win8.1 device. Thats an impressive statement from a technogeek. (Realistically, as with Vista and Win7, I will get one such device, because my next laptop or high end device will come with Win 8.x for free, and thats good enough to install Linux on top of).

I dont like to be negative to products in the market, but it feels that we are into a new era, where companies are trying hard to stay still. Android has enough diversity and momentum to offer new surprises. (I was never positive on Android in the beginning - I "didnt get it", until the day I needed to do email on a phone and do some of the other "social" stuff). Android has many annoyances and ugly warts - its not perfect, but it doesnt matter, because there is "choice" (in HW and SW).

Posted at 23:37:56 by fox | Permalink