denosaurs / denosaurs/cache

Use `sync` variant of file operations

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
50
Forks
7
PR merge metrics
No merged PRs in 30d

Description

`readFIle` --> `readFileSync`
... and any others

This could be seen as quite a file-heavy module, so i think speed can be a concern. By nature, async operations are slightly slower to process than sync operations (as in awaiting those). Alongside this, I have seen time and time again (and ive just tested this again), that Deno's sync methods are faster than the async variant (about 400% faster when comparing readFile and readFileSync)

So thats why i think it would be a good idea to do this, and there's no loss - maybe even some methods may not even need an `await`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.