Productivity, ListViews, going dark and more


I haven’t been posting much lately, and chances are that I will go totally dark for the next few weeks. Bummer.


But anyway, until I get back:


1. Improve your ListView performance –  instead of creating and adding ListViewItems in the same loop,  create an array of ListViewItems and add them in one step using the .AddRange method.  I showed this to a developer on the team and his listview performed over 1000% better with large lists (>1500 records)


2.  Did you notice that DictionaryEntry isn’t a class – it is a structure?  


3.  Two monitors are sooooo much better than one.  I finally broke down and got a DVI to VGA adaptor (costs ~10$). I hooked up an old 19” to my Radeon 9800. Last but not least I installed UltraMon. Now I can view my XML at 2560*1024 – cool!  My productivity just went shwing… 


4. Everyone go tell Roy that freezing his ass off in Norway is no reason not to post! 

Comments (3)

  1. Roy Osherove says:

    Heh. Nice listview tip. Will use it next time.

    And yes,freezing thy ass off is a valid reason 🙂

  2. zl says:

    thank you for the articles .

    but i don’t know how to do this "create an array of ListViewItems and add them in one step using the .AddRange method" if you only can get the count of listviewitems on the program is running .

    (sorry,I know only little english ,i come from china)

  3. zl says:

    thank you for the articles .

    but i don’t know how to do this "create an array of ListViewItems and add them in one step using the .AddRange method" if you only can get the count of listviewitems on the program is running .

    (sorry,I know only little english ,i come from china)