In order to improve the speed of harmonic measurement on the premise of known phase accuracy requirement,quantitative analysis of phase error based on WFFT,the formula between phase error and window period number, sampling signal frequency,initial phase is deduced. On this basis, a method which find the optimal window length according to the accuracy demand in actual phase measurement is proposed. The formula of the relationship between the sampling frequency / window length and the phase error is fitted, the minimum window length can be determined by the phase error precision, so as to improve the speed of harmonic measurement. The fixed side lobe attenuation rate makes the phase error range the most accurate. Simulation results show that the known initial conditions and error accuracy requirements of the premise, a window of the length of the shortest and most suitable side lobe decay rate can be found, so that the fastest harmonic measurement.