Real-World WPF Start Time Perf Tip - Delay Setting the DataContext
.NET applications traditionally suffer from slower startup time than native applications, caused by the time to load the .NET framework DLLs, JIT time etc. WPF applications have further things that can slow down cold start-time, the extra PresentationCore, PresentationFramework and WindowBase assemblies that need to be loaded and the start-up of the PresentationFontCache service. Any tips to help improve start time is therefore most welcome.
Doug Stockwell recently released an updated version (v1.6 build 2802) of his free RikReader WPF-based RSS Reader, with considerably-improved start time. I've been using RikReader as my primary RSS reader since it was first released, and in previous versions the start time stood out as a blemish on an otherwise excellent app. The performance characteristics of older versions of RikReader were a little different to usual applications, in that the hot start-times were still quite bad (>10 seconds for my list of a couple of hundred feeds), whereas the new version hot-starts in about 4 seconds (roughly equivalent to Expression Blend, Thoughtex and most other WPF applications I use). Cold start-times for RikReader had also improved noticeably.
I contacted Doug to find out what he'd done to achieve this great improvement, and was pleased to hear of the simple change he had made. Instead of using XAML to declaratively set the DataContext for his main window, which contained all the RSS feed data, he switched to setting it programmatically in the Application.OnActivated. This sounds like a tip that would improve the perceived performance of the app (making the main window display more quickly) without improving the actual performance, however it seems to have also improved the actual start time considerably. As with all things performance-related your mileage may vary, and it pays to measure yourself. Fortunately the simplicity of this change means it will be easy to swap between the two methods of setting the DataContext.
Categories:
Comments:
#
Windows Forms
posted by
Cornel
on
2/5/2008 9:34:58 PM
:
In Windows Forms exists this event?
#
WinForms equivalent
posted by
JosephCooney
on
2/7/2008 11:58:18 PM
:
I don't believe there is a winforms equivalent of this (Application.Activated) however there is the Activated event for a form. Data Contexts etc. are not present in Windows Forms.
#
good
posted by
Gym
on
10/16/2008 2:33:54 AM
:
Im agree.
#
support
posted by
hanyujoys
on
11/10/2009 2:41:34 PM
:
Support of the Lou Zhu, Lou Zhu worked hard
Signature--------------------------------------------------------------------------------------------------------------------
Nothing is impossible for a willing heart.
[url=
http://www.uggshelf.com/Products.html][color=black]ugg boots[/color][/url]
Signature--------------------------------------------------------------------------------------------------------------------
Nothing is impossible for a willing heart.
[url=
http://www.uggshelf.com/UGG-Bailey-Button/View-all-products.html][color=black]ugg bailey button[/color][/url]
#
www.nikejordansale.com
posted by
mbt shoes clearance
on
11/21/2009 5:31:41 AM
:
welcome to our website:
http://www.nikejordansale.com ,we hope become your reliable online cheap goods supplier in china.Authentic goods with original box,we insists tha"Customer the highest,Quality first!"Our products include mbt shoes clearance,ugg classic tall sale,mens air jordan shoes and other cheap goods.We are looking forward to building sincere and long-term business relationships with you.
#
uggs on sale
posted by
uggs on sale
on
11/25/2009 7:58:40 PM
:
S11125L2UGG popular star in Hollywood several years ago had spread to uggs on sale mean the improvement of people's lives and as a force to follow the ugg boots uk star to wear UGG's wave of school is becoming everyone's most interesting content. Here Ai Sa Kaka on the boots on sale popular UGG fashion for up to one sorted out a set of current Hollywood's most sought-after actress of the ugg bailey boots UGG shoes, street beat, let's take a look at what they are wearing UGG's Bar.
http://www.uggbootssaleonline.com
#
timberland work boots
posted by
timberland work boots
on
11/26/2009 2:28:16 AM
:
S11125I2 The son of wealthy and influential Athenian parents, Plato began his timberland chukka boots philosophical career as a student of Socrates. When the master died, Plato travelled timberland waterproof boots to Egypt and Italy, studied with students of Pythagoras, and spent timberland work boots several years advising the ruling family of Syracuse. Eventually, he returned timberland custom boots to Athens and established his own school of philosophy at the Academy.For students enrolled there, Plato tried timberland high top boots both to pass on the heritage of a Socratic style of thinking and to guide their progress through mathematical learning to the achievement of abstract philosophical truth.
http://www.officalsale.com/specials.html
#
http://www.ladyugs.com/specials.html
posted by
Ugg Classic Boots
on
11/26/2009 1:24:14 PM
:
S11125H2 Towering genius disdains a beaten path with discount ugg boots. It seeks regions hitherto unexplored.A man may lead a horse to the water, but he cannot make it drink and walk with ugg classic tall .Victory wil not come to ugg lo pro button unless I go to ugg classic cardy.Goals determine what you are going to ,for example, buy ugg knightsbridge.
http://www.ladyugs.com/specials.html
#
uggs on sale
posted by
uggs on sale
on
11/28/2009 7:39:21 PM
:
S11128L2UGG popular star in Hollywood several years ago had spread to uggs on sale mean the improvement of people's lives and as a force to follow the ugg boots uk star to wear UGG's wave of school is becoming everyone's most interesting content. Here Ai Sa Kaka on the boots on sale popular UGG fashion for up to one sorted out a set of current Hollywood's most sought-after actress of the ugg bailey boots UGG shoes, street beat, let's take a look at what they are wearing UGG's Bar.
http://www.uggbootssaleonline.com
#
http://www.elegantugg.com/ugg-classic-short-c-1.html
posted by
ugg short
on
11/29/2009 4:02:13 PM
:
Ugg classic Short most people around the world accepted by the whole. Ugg short are fashionable, give your feet a warm feeling. Discount ugg boots at inexpensive prices, many people can choose their favorite boots, I believe your choice is good.
http://www.elegantugg.com/ugg-classic-short-c-1.html
#
MBT Shoes, Nike shoes, Christian Louboutin
posted by
nike dunk Sb
on
12/3/2009 11:42:44 PM
:
Thanks for the awesome information.To celebrate Christmas,there are great sale promotions on
http://nikejordanshoes2sell.com/,all of our products such as cheap air jordan men shoes,af1 shoes,nike nz shoes or ed hardy high boots ,d&g high boots are on sale,ugg sundance II boots low price,high quaility.Time limited!come on to get what you want!
#
Online shopping Air Jordan shoes, UGG boots
posted by
online shopping
on
12/3/2009 11:51:53 PM
:
Thank you for the great job,it help me so much!With christmas approaching,our website
http://www.onestop-onlineshopping.com/are on sale promotion,you can find all of our christian louboutin high boots,ugg 30th anniversary and cheap jodan shoes low price but also high quality.more products such as nike shox nz shoes on sale ,d&g men high cut boots, are showing to you.There must be something you would need!
#
UGG boots sale
posted by
Buy UGG
on
12/3/2009 11:52:15 PM
:
Thank you for the message supplyer!There are amazing ugg ultra tall ,ugg sundance II and cheap ugg night fall sale promotions on our company to thank for the customer of
http://www.uggboots2buy.com/ and to embrace the coming Christmas. You can Get one gift free once you buy an ugg boots,such as cheap ugg classic crochet or ugg bailey button on sale on our website. Action is louder than speak. Hurry up and you may be the first one to get the gift.
#
http://www.bytobyshop.com
posted by
alinkes
on
12/22/2009 8:12:03 PM
:
welcome to
http://www.bytobyshop.com.
www.bytobyshop.com.Top quality, Competitive price, Fast shipping, Combined order, Drop shipping available, Best and Timely Service, 100% Satisfaction, Big discount for big order. From Internationa-acschina. our sell Nike Dunk high, <a href="
http://www.bytobyshop.com/">Nike Dunk low</a>, <a href="
http://www.bytobyshop.com/">Nike Air Force 25</a>, Nike ACG, Nike Blazer, Nike Shox, Nike Air Force, Kobe Bryant, Steve Nash, Nike football shoes, Nike Athletics, Nike Free, Nike Sandals, Nike Rift, Nike Air Max, Nike Air Max 90, Nike Air Max 95, Nike Air Max 97, Nike Air Yeezy, Nike Air Max LTD, Nike Air Running, <a href="
http://www.bytobyshop.com/">Nike shoes</a>, Nike Backpack, Supra Skytop High, Supra Cruizer, Supra TK Society, Supra Vulk Low, Supra Suprano High, Supra Vaider, <a href="
http://www.bytobyshop.com/">Supra</a>, Supra shoes, Puma Speed Princess Ballerina, Puma Clyde, Puma YO, Puma Cabana Racer, Puma Tee, Puma basket, Puma shoes, Puma sneakers, Adidas Soccer shoes, Adidas 2009, Adidas ZX, Adidas NBA, <a href="
http://www.bytobyshop.com/">UGG Boots</a>, UGG slippers, UGG sandals, UGG Handbags
#
cheap shoes
posted by
lttyyp
on
12/22/2009 8:13:38 PM
:
People's life is cannot leave the shoe, it already became lives the essential material needs, it is the social civilization development product. Along with did society's development, how find a good shoe, stood wear and the attractive shoe has become a big topic which the people choose now! This company is located at China, manages each kind of shoe, we have the special performance test personnel, in the quality we guaranteed that is first-class! Because we sell the shoe are many, therefore our shoe can probably be cheaper than other company's shoe. Welcome us the company website:
http://www.bellbestnike.com http://www.bellbestpuma.comhttp://www.okeywecan.com http://www.bellbest.com
#
Atlantica Gold
posted by
Atlantica Gold
on
1/16/2010 6:14:52 PM
:
Atlantica online Gold and the swordsman in the game. Is it solo able in the Atlantica Gold? It is not too bad, you should survive pretty well with buy Atlantica online Gold if you equipment is up to date. Someone would like me who just reached IVI90 be able to survive more than one hit because cheap Atlantica Gold. The work of the reward system works without Atlantica online money.
http://www.virgame.com/atlantica-online-c-144.html
#
uggs on sale
posted by
ugg boots
on
1/26/2010 12:01:31 PM
:
100126SLLYH
Our greatest glory uggs boots consists not in never falling but in rising every ugg classic tall time we fall.It is not enough ugg classic boots to be industrious, so are the ants. What are you industrious about ugg classic argyle knit? You have to believe in yourself. That's the ugg bailey button secret of sucess. A wise man never loses anything if he has himself. To be without some of the things you want is an indispensable part of happiness.
http://www.4ezlive.com/
#
Warcraft 3 CD Key
posted by
Warcraft 3 CD Key
on
2/5/2010 3:06:36 AM
:
CDKeyforsale.com sells most popular game cd keys. Such as: Diablo 2 CD Key, Warcraft 3 CD Key, Starcraft CD Key.