Smiles performance improvement and memory usage optimization