An inspection tool includes a controller that is configured to generate a scan pattern for an electron beam to image areas of interest on the wafer. The scan pattern minimizes dwell time of the electron beam on the surface of the wafer between the areas of interest. At least one stage speed and at least one raster pattern can be selected based on the areas of interest. The controller sends instructions to electron beam optics to direct the electron beam at the areas of interest on the surface of the wafer using the scan pattern.