Fix performance issue when loading catalog tree.