Objective. To investigate the impact of scan path optimization on the dose accuracy and beam delivery time (BDT) of proton pencil beam scanning in the dose-driven continuous scanning (DDCS). Approach. A diverse set of six clinical plans, representing various spot patterns and treatment sites, was used to evaluate the effectiveness of scan time optimization and scan length optimization. The DDCS dose discrepancy and BDT with optimized scan paths was compared to the default serpentine scan path. Main results. Both scan time optimization and scan path optimization were able to reduce the DDCS dose discrepancy compared to the default serpentine scan path. All plans, except for the layer repainting lung plan, achieved a 2%/2 mm gamma pass rate of over 99% and less than 1% PTV DVH root mean square error (RMSE) through scan path optimization. In the case of the layer repainting lung plan, when compared to the default serpentine scan path, the 2%/2 mm gamma pass rate showed improvements from 91.3% to 93.1% and 95.8%, while the PTV DVH RMSE decreased from 2.1% to 1.7% and 1.1% for scan time optimization and scan length optimization, respectively. Although scan time optimization resulted in shorter total scan times for all plans compared to the default scan path and scan length optimization tended to have longer total scan times. However, due to the short total scan times and their minimal contribution to the total BDT, the impact of scan path optimization on the total BDT was practically negligible. Significance. Both scan time optimization and scan length optimization proved to be effective in minimizing DDCS dose discrepancy. No definitive winner can be determined between these two optimization approaches. Both scan time and scan length optimization had minimal effect on the total BDT.