optimization for memory usage of the first version of workshop
Revert "optimization for memory usage of the first version of workshop"

This reverts commit 8152983b5b94db82efe3c313670dd84d1923320a.
Optimized version for memory usage