Skip to content

improve find_resource method

Motivation

As Hash Kern developer, I need to reduce dependencies on environment and tools, also improve the performance of Hash Kern to make developer experience better.

Current state

find_resource method uses find command to search for resources and it always searches from the disk without any cache.

Desired state

find_resource will use python functions to search for resources and have a cache for already searched resources.

Steps

  • Use pathlib to search for files and resources.
  • Add a cache to Resource Space indexed by resource's name and kind.