At YVR in particular lately I have had some horrible issues with deplaning and CBSA control of corridors. The flight that arrives just before AC025 departs invariably has occupied the sterile corridor meaning that we cannot board until the entire aircraft is empty, often a 30-40 minute delay. CBSA and YVR ops could control this better - redirect up a closer escalator to the sterile walkways rather than down the long hallway to the other escalator - but these aren't always posted as delays.