Retrieval/Deployment Scope: Selective refresh

Issue #1919 resolved
Piotr Kożuchowski created an issue

Add option to quickly refresh only selected type of metadata. It would do the same as clicking Refresh, but it would be only for given type and would be much faster:

Comments (6)

  1. Scott Wells repo owner

    You can do this with any of the metadata actions by initiating the action using the context menu on the desired scope, or if you didn't do that, just switching Contents to Context will narrow the scope to the IDE selection at the time that the action was initiated, e.g.:

    Issue_1919.png

    For the Refresh Metadata action specifically, the selected context is used even though the intermediate dialog isn't displayed. So if the focus is on a single Apex class file when that action is initiated, only that class will be refreshed. If instead the classes folder is selected, all local classes will be refreshed. You can even use other selections to define a contextual scope, e.g., a version control changelist which can be handy to deploy/retrieve/compare only the modified source files.

    Does that address the concern here? If not, can you please elaborate on what's missing?

  2. Piotr Kożuchowski reporter

    Hi Scott,

    I think I made it confusing, so let me rephrase.
    I don’t want to refresh files in the project, but refresh listing in Retrieve/Deploy dialog.

    For example, if I want to retrieve component (ex. a class) from another environment that I don’t have in my project and I can’t see it in the listing, I’d normally hit Refresh button in modal - that would refresh listing from target environment and I would be able to see that class I’m looking for.
    Now this suggestion is to add ability to refresh listing for single folder - in this case “classes”, which I assume would be much faster than refreshing listing for all component types.

  3. Scott Wells repo owner

    Ah, I see. How long is the refresh cached metadata action taking for you? I'm just wondering because if it's taking a long time, perhaps it would be best to look at where that time is going and whether/how it can be optimized vs. potentially having a partially up-to-date(/stale) version of the cache vs. now when the cache is reflective of the total org state at a given point in time.

  4. Scott Wells repo owner

    Hi, Piotr. I just wanted to follow up on my previous question about how long a refresh of the cached metadata is taking for you. In fact, would you mind adding the following to Help>Diagnostic Tools>Debug Log Settings:

    #com.illuminatedcloud.intellij.configCache.FilePropertiesCache
    

    then refreshing the metadata cache at least once but ideally a few times, then sending me all idea.log* file(s) that contain the log entries for those actions? You can either attach them here or, if you'd prefer for privacy reasons, email them to support@illuminatedcloud.com.

    If it's taking significant time (more than a few seconds), I'd like to see whether it can be optimized further as-is or whether a more selective refresh is required in some situations.

  5. Piotr Kożuchowski reporter

    Hi Scott,

    Sorry for long response, I’ve measured this with stoper in my hand and turns out that every time this operation takes more or less 20 seconds (measured against different environments).
    So I was probably exaggerating 😃 I was under impression that it takes much longer than that.

    Sorry for taking your time, but I think it’s fine to just close this issue 🙂

  6. Scott Wells repo owner

    No problem. Glad you were able to get some good insights. If you do find that it's not behaving as it should, feel free to reopen with additional details.

  7. Log in to comment