Batching Ar2 queries

Hey, just a small update to this from my side:
I’ve added a “Cached Resolver” to the USD resolver repo, here is a short description of what it does:

  • Cached Resolver - A resolver that first consults an internal resolver context dependent cache to resolve asset paths. If the asset path is not found in the cache, it will redirect the request to Python and cache the result. This is ideal for smaller studios, as this preserves the speed of C++ with the flexibility of Python.

Small disclaimer: I’m still learning C++, so there might still be some issues hidden in the code, the unit tests and Houdini tests work though. To make it work, I had to kind of hack around the “constant” (pointer) variables in the _Resolve method by calling into Python. I wouldn’t consider this a good practise at all, but it works (for now) :wink: If someone could give me a pointer as to how to better implement it, I’d very welcome it and be happy to change the code.

I’ve also created a separate forum post for the resolver repo here to make it more search visible (and clearer for handling feedback).

Your repo is excellent - many thanks for all the work there! Be great to team up on this if you have any bandwidth. People have expressed a lot of interest in having common implementations of all this. The TSC has setup the OpenAssetIO roadmap to add the many of these things to the core API to save each site having to implement the same mechanisms… (multi-language, re-usable/distributable read-through cache). Be a shame to be working on the same thing in parallel.

Many thanks :slight_smile: I hope it helps especially smaller studios. Not sure yet where the USD asset resolver fits into the whole OpenAssetIO picture, I’d be happy to adapt the cached resolver (or create a clone that is adapted to OpenAssetIO or try in helping out building sth for OpenAssetIO) as soon as things are more standardized on that front. As mentioned above, I’m pretty sure I’m also not following best practises on the C++ side yet, so I think it would be good to kind of keep the two project separate for now and in the future we can take a look again when both have progressed.

Links:

Cheers,
Luca

1 Like