Whenever you talk about performance analysis or performance tuning we always analyze majorly the response time and one major part of this is LOAD and GENERATION Time.
Understand it this way , we can broadly categorize any program into two phases :-
1. Where it exists as SOURCE CODE , that means that since the system installation programs are never executed. In this phase the source code is saved in the REPOSRC table , formerly it was stored in D010S table till SAP Web AS6.40
2. Where the code is executed after installation are stored in another table. this phase can be termed as LOAD PHASE . So basically the phase where programs that are executed are saved. The executed program are saved in the REPOLOAD table , formerly known as D010L table till SAP WEB AS 6.40. Make an additional note here, Each time an ABAP or its dependency is changed, it needs to be compiled again. We can use SGEN command to execute the source codes in advance , it should be executed after every Support Package or upgrade, because the ABAP sources have been changed. It is a high performance task so it should be executed when low users are working and restart is recommended.
Just explaining the above diagram here
User Requests for a Program (It should be loaded in the local memory of work process) :
if program present in buffer : It is retrieved from buffer.
if not : work process will check the REPOLOAD TABLE
After that if available in REPOLOAD :
it is shared from REPOLOAD -> BUFFER -> WORK PROCESS
if not : work process need to check to REPOSRC table
After that if not available in REPOLOAD but available in REPOSRC
It is generated from REPOSRC .
If we go other way around I think it will make more sense to you
REPOSRC -> REPOLOAD -> BUFFER -> LOCAL MEMORY OF WORK PROCESS
We even have an advancement in this since NW AS 7.0 if work process needs the load (program is not existing in buffer) , another DIA work process is assigned that job and the first work process goes "On Hold" with reason RPC . The complete work of second work process is considered as LOAD(Executed Code -> BUFFER) and Generation time (Source Code [REPOSRC] -> Executed Code [REPOLOAD] ) and for the second work process DB request time is not separated from Load and Generation time which was the case before SAP WEB AS 6.40.
In case where another DIA process is not available , Work process which request will only need to perform the load and generation also.