Thursday, 20 of June of 2013

Tag » speed

Performance in Windows

I downloaded a demo of a freeware Ribbon Control from Code Project the other day and the experience was interesting.

I develop software on my main PC, which is a number of years old. It has a 2.5 ghz Celeron CPU, NVidia Graphics card, 768 meg Ram and is running Windows XP Home (sp2). In my opinion this is a decent machine. While I have two other PC’s, one with Windows Vista Home and the other with Windows 7 (64 bit), I prefer to work on my XP machine.

I ran the demo I mentioned and while impressive in appearance, it ran so slow (mouse was sluggish) that it was disappointing. I decided to check the app using the Depends utility to see what API’s the app was calling and it turns out it was a dot.net app, so it was using the dot.net runtime.

While the newer technologies Microsoft provides for software development are impressive, it amazes me that performance is at the bottom of the list of features.  Even some years ago, when I purchased Visual Basic 5.0 Pro, it was interesting to note that the software license prohibited publishing any benchmarks of the software. In the old days (DOS), it was common for compiler makers to tout benchmarks in their advertising. But now, it appears few even care any more.

Why ?

In my opinion it is a mindset. In the old days programmers cared about efficiently using memory, but today no one cares because as they say “computers have so much memory today, it doesn’t matter any more”. In the old days programmers cared about the raw speed of their applications, but today no one cares because as they say “computers are so fast today it doesn’t really matter”. Can you see a pattern here ?

Computer hardware has improved so rapidly that few care any more about performance any more.

But …

A recent situation has brought performance back into view and software developers are paying the price for such attitudes. Tablet PC’s for one has brought hardware performance and software performance back into view. Intel created the Atom CPU for netbooks and also for Tablets (also the new Sandy Bridge CPU’s). These are powerful CPU’s and I mean powerful, but sadly software developers are calling them “slow” and “poor in performance”. Why ?

Not because they are all that bad, but because the bad attitudes towards software performance are coming back to haunt software developers. You see, netbooks and tablets have three issues to deal with that normal PC’s do not. The first is size. Faster CPU’s, bigger harddrives, more memory require more space. Netbooks and Tablet PC’s need to be small as possible, so they have to use less in the hardware area. Second is power consumption. Desktop PC’s can eat power all they want, but Netbooks and Tablet PC’s need to run off batteries so they need to conserve power. This means smaller and less power hungry hardware is required. Third, Netbooks and Tablet PC’s need to have lower cost parts, so they are affordable. People are willing to pay more for a desktop PC, since it is bigger and better and does more. People don’t want to pay twice the price for a Tablet PC, which has less memory, less speed, less screen size and less data storage than their desktop PC.

Because new technologies are becoming so popular (Netbooks, Tablets), software developers are stuck trying to find ways to get their software to run half way decently on these new devices, but they can’t, so in typical programmer fashion, they simply blame the hardware developers and say its their fault.

This problem has really hurt Microsoft in my opinion, since Microsoft is way behind in offering Tablet PC’s running Windows 7. Everybody wants an IPad and there are few Windows based Tablet PC’s coming to market right now. Have you noticed the hardware makers and the Tablet PC’s they are currently offering with Windows 7 on them ? They are not targeting the average consumer (you and me). They are targeting business and corporate markets. Why ? Because they can’t get the price of Tablets down enough for the average person, so a decent tablet which will run Windows 7, requires a more expensive Tablet and only businesses are willing to pay premium dollars for them right now.

The fault in my opinion falls on software developers and not hardware developers. Yes, programmers have had it too easy for too long and now they are paying the price. Even Microsoft is paying the price now.

I get picked on (when visiting programming forums) by other programmers for developing software for legacy operating systems (ie. Windows 95,98,ME) and for using an XP system for development.  Most programmers in my opinion use the latest PC hardware and target the latest technologies. One of the problems with this is that if you don’t make sure you do extensive testing on older PC’s, you have no idea whether your software is performing very well. When I say performance, I mean “raw speed”.

I find that it is better to develop on an “average” computer, rather than a “bleeding edge” computer, because I get immediate feedback on how my software is running. I am a programmer who concentrates on using resources efficiently. If I can write apps that fly on a 500 mhz CPU computer with as little as 256 meg ram, imagine how they will run on the latest hardware.

This is one of the goals of my development tool EZGUI 5.0. Combine it with Powerbasic (which produces lean and mean apps) and you have a development system which can run circles around others. EZGUI’s main runtime DLL has more packed in its 700 KB size DLL, than other development libraries twice the size (or more). EZGUI does not require dot.net (neither does Powerbasic), so it can be used to write applications which will run on Windows 95 to Windows 7.

Lastly, the lack of appreciation for designing software with raw speed and performance, has also hurt society because, rather than use computers for a long time, software developers (and their end users) keep requiring faster and faster computers, so more and more decent computers are ending up in landfills, consumers and businesses are wasting money, always having to “upgrade, upgrade, upgrade” to the latest technology, simply because the new software just won’t run on their perfectly good PC’s any more.

Maybe this should change. Maybe programmers should start caring again about how they write their software and the resources required to run them. Maybe programmers need to work a little harder. Now before you say it can’t be done, let me point out to you that some are already doing this. Even right now, my customers are writing software with amazing user interfaces, which can still run on legacy PC’s, which run fast on the current Windows Netbooks and Tablets and some of them even can fit their software on a floppy disk.


Comments Off

Tablet PC’s and the EZGUI advantage

I am looking forward to the release of Tablet PC’s with Windows 7. The real question is will software developers be able to create software that will run well on Tablet PC’s and make them an asset. Windows 7 already has one strike against it. The Windows operating system has progressively become more and more bloated as time has passed, requiring more and more powerful hardware to keep up. True Windows 7 is much better than Vista, but Vista was a worse case scenario, so that does not necessarily say much. It is interesting that there are so many Windows XP PC’s still in use today. At last count, there were more XP computers than Vista and 7 combined (likely this will change in the next year or so) at least based on the surveys I have seen.

For Tablet PC’s to become more than just a fad, they need to solve real world problems and to become useful for everyday practical situations beyond just surfing the web and for playing entertainment (games and movies). The IPad appears to be very successful right now, but I would ask the question , “How many businesses are using IPads for real world applications ?” and “How many businesses are writing their own inhouse software for the IPad ?”. I don’t know, but I would be curious to see any surveys that answer these questions.

Personally I think the Tablet PC could be an amazingly useful tool. But there is a problem. Tablet PC’s, similiar to Netbooks, likely will be built upon less powerful CPU’s (and other hardware). To be successful, the price for Tablets has to be low enough to make them worth the expense for common place use. I don’t consider $500 inexpensive.  $500 can purchase a very decent desktop PC or Notebook, with a very nice sized screen, better hardware, 2 to 4 gig memory and a decently powered CPU. To produce a tablet PC, which should be half the price of a desktop, in my opinion, requires a much smaller screen, much less memory and far less drive space, plus a CPU which has half the horsepower of a desktop CPU. To get prices low enough (Windows 7 alone will add a good chunk to the price of the Tablet), a Tablet PC will be considerably less powerful than most inexpensive desktops and notebooks.

As a software developer who considered it important to build software which runs well on minimal hardware, I often was criticised by other developers because they would comment that the average PC has plenty of memory and a huge hard drive, so why develop my software for such minimal hardware ? It is because if software runs well on minimal hardware, then it will run very well on better hardware and it also allows end users to use the lesser powered computers for a longer period of time. Just think about this. How many times in the past did you purchase (or want to purchase) software only to find out that your current computer would not run it at all or at least would not run it well ? Frustrating isn’t it ! My wife learned to use CorelDraw Graphic Suite software and when she decided to purchase an upgrade, it was frustrating to find out that it would not run on Windows Millenium (which had served her well), so we were required to purchase an update to Windows XP, just so we could use the upgrade of CorelDraw. The PC was only a 667 mhz and while it ran well with Millenium, Windows XP (it did run) took a little more horsepower, so the PC became a little less powerful. I also added some memory to that PC so XP would run decently (upgraded from 256 meg to 384 meg). That computer is still in use today, even though it probably has close to ten years on it.

The problem that desktop computer users have, in that each new generation of software keeps requiring more powerful hardware, is compounded when it comes to Tablet PC’s. Look at NetBooks for example. NetBooks were the hot item for awhile and became very popular, but over time, when compared to what you can do on your desktop, Netbooks are losing ground (not as much consumer interest). Some Netbooks come with Intel Atom CPU’s in the 1 to 1.8 ghz range, so they barely run Windows 7 and they don’t have the horsepower of the bigger PC’s. Just the fact that Netbooks usually come with Windows 7 starter, rather than the normal Windows 7 may say something.

Now let’s step back for a moment and take an honest look at just the CPU’s we have today. How powerful are they really ? Very powerful and most programmers (and end users) fail to appreciate this. Why ? Because as the hardware improved, the programming languages used also grew (in size and bloat) and required more and more resources, so that one lost the benefits of the faster CPU’s and the greater amount of memory. But how powerful are todays CPU’s ? From my own perspective, they are “fast as lightning”, but they are abused.

Did you realize that a Windows 95 computer with say 64 meg ram and 100 mhz CPU, is more snappy and faster than todays Windows 7 computers with a 2 ghz CPU and 2 ghz ram ? Why  do I say that ? Because the software written for Windows 95, was designed to have a much smaller footprint and it required much less memory. To the end user, Windows 95 would feel like it was a snappier computer (faster).  Well there is a reason for this. For example on Windows 95, if you were to examine how many services the operating was running in the background, you would be shocked when you examined your latest Windows 7 computer to find that the number has grown significantly and I mean a lot. It seems that the developers of Windows feel that with all the bigger and better hardware, they can just keep bloating the operating system with all sorts of background stuff (services). And they aren’t always critical to the use of the PC. When my XP computer started slowing down, one day I started (after researching it first) shutting off service after service to try to speed it up. Guess what ? My PC was able to do everything it did before, but without those services running. Just to make things worse though, you may find that those updates you download for your operating system, may include a number of new services which will be automatically run when you PC boots up.

My point is that, as long as software developers feel they can “waste” PC resources, software will continue to get slower and slower and more bloated and sadly, while desktop PC’s may be able to tolerate this abuse, the new generation of Tablet PC’s will be more prone to having problems with this. Programmers have to change their attitude towards how they write software and how they use computer resources.

Now bring into this picture the software development tool EZGUI 4.0 Professional (and 5.0 Pro is in development). First, the PowerBasic programming language is one of the leanest and fastest (execution speed) programming languages I have ever seen. EZGUI was written in Powerbasic and to be used with PowerBasic, so it is lean and fast too. But there is more !

Even among PowerBasic programmers, I see the trend to write code which targets the latest and best hardware. While PowerBasic produces lean and fast applications, when you start targeting the higher end PC’s with the API code you use, you still can end up with software that may not run well on limited hardware, like Tablet PC’s. EZGUI is different though for a very important reason. How I develop it and the core concepts of how it was designed are different than most software developers and even different than many PowerBasic programmers. When other third party developers of tools for PowerBasic were all writing their software on Windows XP systems with say 2 ghz CPU’s, I was developing EZGUI on a 500 mhz Windows 95 PC. Now when probably most third party developers for tools for PowerBasic are writing their software on a Windows 7 PC and targeting Windows 7, I am writing EZGUI 5.0 (the next generation) on a seven year old Windows XP PC (2.5 ghz), which used to have only 256 meg ram, but I upgraded it a year or so ago to only 784 meg ram. I do have a Windows Vista computer which is newer and a more recent 64 bit Windows 7 computer, so I can test my software on them, but I develop all my software right now on Windows XP. And guess what ? I’ll even test it on my trusty old Windows 95 PC’s (500 mhz one and even a 100 mhz laptop). Why ?

Because I have always felt it important to write software for the lowest  denominator, because this allows those who use my software to write software which won’t turn all of their customers computers obsolete. Now EZGUI can take advantage of newer features in the operating system, when available, but it does so dynamically so the core runtimes can still run even on Windows 95. You can target the latest operating systems if you prefer. What I have learned how to do, is to squeeze as much out of the operating system as I possibly can, while using API’s from the least denominator of the operating systems if possible. Just to compare the difference of how much I have gotten out of the operating system, while still maintaining a GUI engine with an amazingly small footprint, which will work on even on legacy versions of Windows, let’s compare the core runtime DLL of EZGUI 4.0 Pro, to what you get with a Visual Basic application using VB 5.0 Pro (and this is not the latest dot.net stuff).

Now let’s say you want to write an application which uses a number of the common dialogs (ie. Open/Save file, Colors, Fonts, Printer), a number of the more commonly used common controls (ie. Listview, Treeview, TrackBar, Tab, Toolbar,Updown, etc.) and the RichEdit control (ie. 2.0 version).

With Visual Basic 5.0 Pro your application would require the following runtimes:

msvbvm50.dll – 1324 KB
comdlg32.ocx – 150 KB
comctl32.ocx – 595 KB
comct232.ocx – 161 KB
mscomct2.ocx – 633 KB
richtx32.ocx – 208 KB

Your application would require 3071 KB of runtime DLL’s/OCX’s.

Now compared this to EZGUI 4.0 Pro which can handle all of the above, with its 515 KB runtime DLL which is about 1/5th the size. But the EZGUI runtime has more than what you get in the above. It has an ownerdraw engine to customize controls, a customdraw engine, a subclassing engine, a thread engine, a graphics engine, a print engine. Yet it still has more! In that same runtime DLL it has  four custom controls built in (Canvas, HotSpot/Shape, Files Listbox and Properties Listbox controls). But not done yet! In that same runtime DLL it also has a proprietary 2D (software based) Sprite engine (built into the Canvas control) which can move/show/hide and animate (frames) 2D sprites. It can even alphablend and anti-alias the sprites. Not done yet! In that same runtime DLL it has a Visual Drag and Drop engine built in which allows you to drag and size controls visually. If you want drag handles too, you just add a tiny 18 KB DLL (drag handle control) and you also get drag handles for your drag and drop stuff. And there are many, many more features beyond this and all with a runtime with a small footprint which makes even a VB app look large. Now compare this to the latest programming languages such as the dot.net stuff which are huge in comparison.

To make things even better EZGUI itself was written in Powerbasic and you build applications using it with PowerBasic, so you get very fast speed and the EXE’s you compile (which will utilize the EZGUI runtime) will be so tiny you will be amazed. So how did I create such a powerful development tool which can do all of this, but still require absolutely minimal system resources ? PowerBasic is part of it, but the rest has been the design philisophy of EZGUI. I wrote it using the least denominator so it will run well even on older operating systems and PC’s with minimal hardware.

EZGUI is an excellent development tool for writing applications which can run on any Windows 7 (Intel/AMD CPU)based tablet PC, no matter how minimal the hardware is. EZGUI apps will take so little space, they will need little in drive space storage, little in memory and they run fast even on the lowly Atom CPU running at 1 ghz. Remember I have done testing of EZGUI, even on a Windows 95 PC with a 500 mhz CPU, so a 1 ghz CPU is fast from my viewpoint. I doubt many software development tools today are designed with the same concept  as EZGUI, trying the make the most out of the least in computer hardware and operating systems.

If you have a company which wants to develop software that will “fly” on even the lowliest Tablet PC with Windows 7 on it, then seriously consider what EZGUI 4.0 Pro (and PowerBasic with it) offers you. Also one nice thing about EZGUI, is that since it does a lot of the work for you, you can even use the inexpensive Powerbasic Classic compiler which currently is selling for only $49. You don’t need the higher level PowerBasic 9.0 compiler which costs close to $200. If you have never used PowerBasic before, rather than purchase the $200 compiler, you can purchase (while EZGUI is on sale) both EZGUI ($159 on sale) and the Classic PowerBasic compiler ($49 on sale) for a total $208.

Now I should note that the 5th generation of EZGUI is in development (but will be awhile before it is released). If you think EZGUI 4.0 is powerful, wait until you see 5.0! Just as a sneek preview, EZGUI 5.0 will include a 3D GLCanvas control (based on OpenGL) so you can even do 3D animation. The new feature set in EZGUI 5.0 is very extensive and will surprise you.

I may be biased of course, since I developed EZGUI, but personally I think EZGUI 4.0 is (and also 5.0) one of the most powerful development tools for building applications for the next generation of Tablet PC’s running Windows 7. If you want an edge in developing software for Tablet PC’s running the real Windows 7 (not the ARM version I hear may be coming soon) consider EZGUI Professional.


Comments Off

Tablets, Tablets, Tablets !

I have been watching all the news about Tablet PC’s for some months now and while it is peeks my interest, I don’t see much that interests me yet.

Why ?

To be honest, I am a “late adopter” of technology. While many will spend big bucks to buy the latest fad in technology, I personally only buy what I need, when I really need it, and even then only if I can get it for a really great price.

So if I had my way, what would I want for a Tablet PC ?

I think the Intel Atom processors are a great concept. Low cost, mass produced, lightweight CPU’s. Now a lot of people are critical of the Atom, saying it has too little horsepower. The Atom is very powerful, IMO. The problem is that software has become bloated (big and slow), so it makes a decent PC look terrible. So what is needed ?

(1) Make a Tablet PC as low priced as possible and I mean low priced. The target price is $99, but no more than $199. You don’t need a lot of “bells and whistles” either.

(2) Microsoft needs to take Windows 7 and to make a Tablet version (Intel based only) which is basically the same operating system on desktop PC’s, but to literally remove all the bloat they can from it. If the average person doesn’t need it, then take it out of Windows.  I don’t need dot.net runtimes. I don’t need anything fancy on the Tablet. I just want the core operating system which will run apps I write.

(3) Encourage a new breed of developers who can write apps which require minimal amount of memory and hardware.  Leave all the Visual Studio stuff, dot.net stuff for the big PC’s. The target size for the average application for this Tablet should be 1 meg in size or less. Large applications for such tablets should be no more than 5 meg in size.

At this point a lot of programmers will say, you can’t write apps that small today, which don’t need any fancy hardware!

(4) My answer to that comment is, YES you can !

One of the best kept secrets in the software industry is the PowerBasic compilers. Programmers who use it are writing powerful apps which can fit a on floppy disk and which require little in memory and hardware. My own GUI engine (see my web site for more info) can be used to build large (in task), complex applications, which can fit on a floppy (meaning use little drive space), use little memory and can run with minimal hardware, such as the Atom CPU.  My EZSprite (standalone sprite engine in a DLL) runs great on the Atom CPU and doesn’t require any hardware support at all. The next generation of EZGUI will be sporting some exciting new features, one which is an OpenGL Canvas control which only requires the minimal OpenGL support (version 1.5, possibly even only 1.2), but can do some amazing things.

The problem with Tablets is the the software today keeps getting bigger and bigger and slower and slower, so it makes the current CPU’s look slow (I mean 2 and 3 ghz CPUs). IMO even a 500 mhz CPU is extremely powerful and fast. The Atom CPU’s which range in the 1 ghz to 2 ghz range are very fast. Its the software which is the problem, not the hardware.

A tablet PC probably could be made which is very affordable (less than $200), which would sell like “hot cakes” to the average person, which could run applications at a good pace, but the problem is with the software developers. The operating system is bloated. Have you taken a look at how many services are running on the latest Windows 7 PC’s ? Application developers all gravitate to the latest Microsoft development tools which on the average are bloated too.  The problem is with programmers. Often they want the programming language to do all the work, so the programming environments get bigger and bigger, the runtimes get bigger and bigger and the software uses more resources than ever before.

If software developers (and the guys who make operating systems) would just step a back a bit and reconsider how they write software, maybe the $99 Tablet PC could be a reality.

You may think that is a “pipe dream”, but I don’t. The good old “faithful” Visual Basic 5.0/6.0 was put out to pasture in favor of even more bloated programming languages. Yet, in all fairness, my own EZGUI 5.0 (in development) plus the inexpensive Powerbasic Classic (currently only $49) compiler together, can do more in less than 900 KB of runtime DLLs, than the VB runtime (1.4 meg runtime DLL) plus all its supporting common control, richedit and common dialog OCX’s combined.  Now VB is considered a lightweight programming language compared to the current tools and EZGUI/PB can produce apps half the size or even smaller than VB 6.0. So I don’t think I am offbase with my comments about software development. EZGUI 5.0 will be adding even more ways to customize controls (will come with a number of new prebuilt custom controls), a new component engine and even 3D Graphics with the new GLCanvas control (OpenGL based) (the 5.0 runtime will probably be less than 700 KB, while the OpenGL control will add another 150 to 200 KB in size in another DLL).

If Tablet makers could create the “perfect” low cost Tablet today, running a lightweight version of Windows 7 on an Atom 1 ghz CPU, with at least 1 gig ram and just a couple gig drive of some kind, I would be happy. I’ll write the software for that and it will run like “butter”. I won’t be using any dot.net runtimes though. Don’t need an programming languages with the word Sharp (#) in them either.

Anybody out there listening ?

Now that would be a real choice compared to the Apple IPad.

Well, I can dream can’t I ?


Comments Off