‘Collapse All’ in Visual Studio

We have tons of sub-folders in our main client project, and every time you access a file in a sub-folder Visual Studio expands the sub-folder, and given how many files we have in these sub-folders, the scroll bar quickly becomes a tiny dot.

Once their open, there’s no easy way to collapse them all except to go through by hand and manually collapse each one again.

The Visual Studio team gave me the following reply to my suggestion for a “Collapse All” ¬†feature:

Posted by Microsoft on 3/29/2010 at 2:10 PM
Thanks for your feedback. This is a good suggestion and one that we unfortunately cannot incorporate in VS2010. However, here is a macro that should help in the meanwhile:

    Sub UIHierarchy_CollapseTree()
        Dim Hierarchy As UIHierarchy

        'Change Hierarchy to the following line to collapse the active window
        'Hierarchy = DTE.ActiveWindow.Object
        Hierarchy = DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer).Object

        CollapseHierarchyItems(Hierarchy.UIHierarchyItems)
    End Sub
    Sub CollapseHierarchyItems(ByVal HierarchyItems As UIHierarchyItems)
        Dim SubHierarchyItem As UIHierarchyItem
        For Each SubHierarchyItem In HierarchyItems
            CollapseHierarchyItems(SubHierarchyItem.UIHierarchyItems)
            SubHierarchyItem.UIHierarchyItems.Expanded = False
        Next
    End Sub

OpenMP joy from Visual Studio :)

An update from my earlier post, I got a reply to my OpenMP 3.0 ticket, for those of you who don’t have a Windows Live account:

Hopefully that means it’ll be in VS 2010 by release time. Superb.

<3 Visual Studio, yet again :)

Going Parallel

I’ve been looking at OpenMP and Thread Building Blocks. I’ve actually managed to OpenMP one part of the client (which seemed to reduce the “chug” as you move at high speed between large areas of terrain, but didn’t otherwise impact performance, maybe at spawning, I dunno), and a few parts of the cell host (I reorganized the order in which the host prepares vehicles for their world update; the initial part of which is quite thread-safe, and boils down to a simple culling algorithm; on the live servers that should significantly reduce the time the world update dispatch takes, meaning that the data sent to clients is “fresh”er by 5-10 ms under busy load).

My initial understanding of both systems was fairly hazy – I’m trying to run before I can walk, but then the documentation for both starts at a sprint.

The worst mistake I made was misunderstanding their focus: which is algorithmic parallelization.

My Review of Intel Threading Building Blocks

Originally submitted at O’Reilly

More than ever, multithreading is a requirement for good performance of systems with multi-core chips. This guide explains how to maximize the benefits of these processors through a portable C++ library that works on Windows, Linux, Macintosh, and Unix systems. With it, you’ll learn how to u…

Little more than the Intel PDFs

By kfsone from Bedford, TX on 3/30/2010
2out of 5

Cons: Not comprehensive enough, Difficult to understand, Too many errors

Best Uses: Expert

Describe Yourself: Developer

The book mostly consists of slightly-annotated variations of the threadbuildingblocks.com PDFs, albeit slightly easier to read thanks to the O’Reilly layout. But, for example, the parallel_scan description is exactly the same – and just as difficult to comprehend – as that in the “GettingStarted.pdf” over at tbb.