Mark
Mark

Reputation: 41

Do WPF projects takes more time to load than WindowsForms?

Do WPF projects takes more time to load than WindowsForms?

Upvotes: 1

Views: 238

Answers (1)

Colin Pickard
Colin Pickard

Reputation: 46643

A small part of a longer answer by Ray Burns (the rest is worth reading too):

You do pay a price compared to WinForms, but it is a small one.

  • RAM can go up or down depending on your implementation. WPF stores its data more efficiently so individual objects are smaller, but there tend to be more objects in WPF than in WinForms so this balances out, and either one can come out ahead.

  • CPU will go up compared to WinForms. In my experience, the actual update of WPF objects onscreen takes about 2x as much CPU as normal WinForms rendering. If your application spends most of its time updating the screen, WPF may not be for you. But in that case you're probably not using WinForms either: Most serious games are written directly to DirectX.

  • Disk usage will be slightly less for WPF because it takes so much less code than WinForms. The data will be the same size, of course.

One more note about CPU use: Animations and transforms (motion, translation, etc) is actually more efficient on WPF than in WinForms because of its retained mode storage. It is the initial getting of the objects up there that is slower

Upvotes: 3

Related Questions