Perforce Public Knowledge Base - Using tight views for best performance
Downloads Blog Company Integrations Careers Contact Try Free
Menu Search
Reset Search



Using tight views for best performance

« Go Back



Limiting the scope of client view mappings, in particular, can help reduce the processing requirements for file based commands and improve performance. 

Using "tight" views

Client views (and branch and label views) can be defined so that users access only the files they require. These restricted client views are sometimes referred to as "tight." 

View mappings restrict the scope of Perforce database scanning and tighter views can yield better overall server performance.

By default, when new clients are created, they have an unrestricted or "wide open" view mapping. These unrestricted views will require more database row scanning than a tighter, more restricted view.:

//depot/...   //ws/...

For example, the following "tight" client view is restricted to specific depot areas:

//depot/main/svr/devA/...       //ws/main/svr/devA/...
//depot/main/dvr/lport/...      //ws/main/dvr/lport/...
//depot/rel2.0/svr/devA/bin/... //ws/rel2.0/svr/devA/bin/...
//depot/qa/s6test/dvr/...       //ws/qa/s6test/dvr/...

Best practice is to create client views that give users just enough scope to do the work they need to do.

Client, branch, and label views are created and modified using the p4 client, p4 branch, and p4 label commands, respectively. Users can also create new client (and branch and label) specs from other existing specs using the -t template flag (or its GUI equivalent) and inherit their view mappings. Perforce Administrators can create client specs with standard view mappings as templates for users that model best practice.

For more performance tips, see Maximizing Perforce Performance.

Note: Although you can use exclusionary mappings in views to reduce their scope, exclusionary mappings have performance implications as they require more data be processed. For reference, the affect of exclusionary mappings is discussed in depth in the following white paper:





Related Links



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255