Skip to content
Versora

Manual

Inspection

Repository treemap

3 min read

On this page

The treemap draws the repository as nested rectangles: each folder is a rectangle, divided into the rectangles of its subfolders and files. The area is the size in bytes. The color shows how much each file changed in a period, or when it last changed.

This way you spot at a glance the large files, the parts of the code that change all the time (candidates for refactoring or for tests) and the ones that have been untouched for a long time.

Where to find it

  • Repository tab menu: Contributors, activity and treemap, Treemap tab.
  • Palette (Ctrl+P): "Repository treemap (size and changes by folder)".

Step by step

  1. Open the treemap from the palette.
  2. Versora reads the sizes ("Reading sizes…") and then the changes in the history ("Reading changes in the history…"). Both readings have a progress bar and Cancel.
  3. Choose the Period of changes: 3 months, 1 year, 3 years or All.
  4. Choose the Color:
    • How much it changed: how many commits touched each file in the period;
    • Recent change: how long ago the last change was.
  5. Hover over a rectangle to see the name, how many files it has, the changes in the period and the date of the last change.
  6. Click a folder to go into it. The Repository › … trail at the top takes you back. Click a file to open it in the revision tree.
  7. Prefer numbers? Click View as list. The list has the Name, Size, Files, Commits and Last change columns. View as map goes back.
  8. To analyze another revision, change the Revision at the top of the screen.

An item's menu

ItemWhat it does
Open folder (folder) or Open in tree (file)Goes into the folder or opens the file in the tree.
Show in the revision treeOpens the tree already on the folder or file.
HistoryOpens the file history, or the folder's, up to the revision.
ContributorsOpens the contributors for that item only.
ActivityOpens the activity for that item only.

Items too small to show up are grouped into an "N more items" rectangle, which has no menu.

OptionWhat it doesDefault
Period of changesWhich commits count for the color: from the last 3 months, 1 year or 3 years, or All.All
How much it changedColor by the number of commits in the period, per file, from "none" to "most".Selected
Recent changeColor by the date of the last change: "outside the period", "over 6 months ago", "within 6 months", "within 3 months" and "last month".—
View as listReplaces the map with a table.Map

What Versora does in git

Read only:

bash
git ls-tree -r -l -z <revision>                                         # size of each file
git log --no-merges --name-status -M -z --format=%x1e%at [--since=@<start>] <revision>  # changes in the period

-M follows renames backward, and the changes to a renamed file count toward its current name.

How to undo

The treemap doesn't change the repository. There's nothing to undo.

Caveats and messages

  • "Partial: only the newest N commits were read": the reading of the changes was canceled midway. The colors only reflect those commits.
  • "no commits in the period": nothing changed in the chosen period. Widen the period.
  • "This folder doesn't exist in this revision.": the folder open in the trail doesn't exist in the chosen revision. Go back to Repository.

Tip

Large binary files that change a lot are good candidates for Git LFS. See also the diagnostics in Optimize the repository, which lists the largest files in the history.

The treemap has no preference of its own and no company policy key.

See also