improve assets output performance

improved performance of simple 1k image:
before: 300 req/sec
after: 600 req/sec

improved performance of 600k Frontend.js:
before: 130 req/sec
after: 220 req/sec