awslabs / llrt

LLRT (Low Latency Runtime) is an experimental, lightweight JavaScript runtime designed to address the growing demand for fast and efficient Serverless applications.
Apache License 2.0
7.73k stars 341 forks source link

Console refactor #393

Closed richarddavison closed 3 weeks ago

richarddavison commented 1 month ago

Issue # (if available)

Fixes: https://github.com/awslabs/llrt/issues/341 Related: https://github.com/awslabs/llrt/issues/351

Description of changes

Refactor console module to use a recursive implementation (we're limiting depth to 4 levels) instead of a non-recursive to simplify implementation and improve performance. This rewrite also removes a ton of branching for everything from indentation to ascii colors etc.

Checklist

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.