VirtualBox

Ignore:
Timestamp:
May 24, 2019 12:26:23 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:7127: Do not perform whole medium-enumeration if one medium was not found in the tree, just enumerate it and it's children; This speedups VM details processing but is a dangerous one, needs to be carefully tested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.cpp

    r78722 r78723  
    231231}
    232232
     233void UIMediumEnumerator::enumerateAdditionalMedium(const CMedium &comMedium)
     234{
     235    /* Put the medium to vector for convenience: */
     236    CMediumVector inputMedia;
     237    inputMedia << comMedium;
     238
     239    /* Compose new map of passed medium & it's children.
     240     * While composing we are using data from already cached media. */
     241    UIMediumMap media;
     242    addMediaToMap(inputMedia, media);
     243
     244    /* VBoxGlobal is cleaning up, abort immediately: */
     245    if (VBoxGlobal::isCleaningUp())
     246        return;
     247
     248    /* Throw the media to existing map: */
     249    foreach (const QUuid &uMediumId, media.keys())
     250        m_media[uMediumId] = media.value(uMediumId);
     251
     252    /* Start enumeration for media with non-NULL ID: */
     253    foreach (const QUuid &uMediumID, media.keys())
     254        if (!uMediumID.isNull())
     255            createMediumEnumerationTask(media[uMediumID]);
     256}
     257
    233258void UIMediumEnumerator::refreshMedia()
    234259{
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette