solc-select icon indicating copy to clipboard operation
solc-select copied to clipboard

cache `get_installable_versions` and `get_available_versions`

Open 0xalpharush opened this issue 2 years ago • 3 comments

There's no need to repeatedly invoke these requests since once the platform is determined, these should not change

0xalpharush avatar Jan 03 '23 14:01 0xalpharush

Would love to help to implement this improvement.

@0xalpharush could you please suggest some examples of how caching might be done here? If you have anything on mind :)

azpwnz avatar Jan 23 '23 18:01 azpwnz

I believe we couldn't cache get_installable_versions() since installed_versions() will be changing. What do you think?

azpwnz avatar Jan 23 '23 18:01 azpwnz

I think we should probably create a class so that there's a way to persist data and update installed_versions. For now, caching get_available_versions is fine as this one involves network requests which we want to reduce

0xalpharush avatar Jan 24 '23 14:01 0xalpharush