Revert "Least memory comsumption commit for large Input"

This reverts commit 597dafecdbf781824326a00bb5b4e474c4ef6b9e.
This change has been added in dev_exp branch