Using tight views
Client views, branch views, and label views should be "tight", giving users just enough access to the depot to do the work the users need to do. For example:
"tight" view |
"loose" view |
---|---|
//depot/main/srv/devA/... //workspace/main/srv/devA/... //depot/main/drv/lport/... //workspace/main/dvr/lport/... //depot/rel2.0/srv/devA/bin/... //workspace/rel2.0/srv/devA/bin/... //depot/qa/s6test/dvr/... //workspace/qa/s6test/dvr/... |
//depot/... //workspace/... |
For most users, a "tight" view is sufficient and quicker because fewer files are transferred. | Although the loose view is easy to set up, because it maps the entire depot to the client workspace, it consumes more resources on the server, the client, and the network. |
Client, branch, and label views are set by a
Server administrator or by individual users with the p4 client
, p4 branch
, and p4 label
commands.
Similarly, the script optimization described in Using branch views and Using a temporary client workspace limit the size of the view available to a command. The benefit is that fewer commands need to be run, and when run, the commands require fewer resources.