Pre-processing whole slide images (WSIs) can impact classification performance. Our study shows that using fixed hyper-parameters for pre-processing out-of-domain WSIs can significantly degrade performance. Therefore, it is critical to search domain-specific hyper-parameters during inference. However, searching for an optimal parameter set is time-consuming. To overcome this, we propose SSAPT, a novel Similarity-based Simulated Annealing approach for fast parameter tuning to enhance inference performance on out-of-domain data. The proposed SSAPT achieves 5% to 50% improvement in accuracy with ×5 times faster parameter searching speed on average.