apigee/apigee-remote-service-golib

optimize API and operation lookup

Closed this issue · 1 comments

I believe we can improve the current implementation to authorize an API call. If we change this tree:

p.PathTree = path.NewTree()

to be global and to have a top-level of API instead of the Operation, we should be able to do a single tree traversal to lookup instead of the looping here:

if p.OperationGroup != nil {

Even more efficient would be to put APIs in a map for hashed lookup.