Optimization against slow down process for node placement.

Fix the slow down issue due to the normalizeGridWeight() being invoked often.