Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic question: possible to reduce API calls when loading objects following login #146

Closed
michaeldesu opened this issue Feb 9, 2022 · 2 comments

Comments

@michaeldesu
Copy link

Hi

Thanks for providing this useful tool. I'm new to Salesforce and have a general question about the API calls made during 'startup' i.e. when the app is collating (describing) the objects. It seems during this time, the API call count fluctuates. I guess this is to be expected - API calls are consumed as info is obtained. For a large prod org like the one I'm connecting to, I am concerned that over time, API calls will be slowly eaten up upon each startup - it's not a huge deal I guess, but I wondered whether it's possible to enable a 'caching' setting to avoid reacquiring object info upon each startup, limit the API consumption, and this will also allow a user to work with the SOQL queries faster (if that all makes sense) as it can take a few minutes for all the objects to be described and queries tend to time out if I run during object info collation.

Thanks.

@superfell
Copy link
Owner

yes, it's technically possible, but the cache would get increasingly out of date. Checking/bringing it upto date would burn the same number of API calls anyway. Large org's tend to end up with large API limits, so I'd be surprised to hear that the <100 used to describe all the metadata causes an issue.
Can you explain your starting query timeout some more? I haven't seen any timeouts while running queries while the describe is ongoing. The 2 shouldn't interfere with each other on either the SoqlX side, or on the salesforce side. (Assuming the network connection from the client isn't heavily constrained).

All that said, the easiest answer to this is to not close the app. It'll keep the metadata cached, and the session will be automatically renewed if it expires. So you can leave the app open indefinitely and it'll continue to work next time you run a query.

@michaeldesu
Copy link
Author

Thanks a lot for your answer (sorry for my delayed reply). I appreciate your advice.

About the starting query issue, thanks for mentioning about your experience - based on your that, I'll monitor it more closely & reopen if it becomes an ongoing problem. It may be possible that I had network issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants