diff --git a/catalog-ui/configurations/dev.js b/catalog-ui/configurations/dev.js
index a57d1b9..26c98d2 100644
--- a/catalog-ui/configurations/dev.js
+++ b/catalog-ui/configurations/dev.js
@@ -429,7 +429,8 @@
 			}
 
 		]
-	}
+	},
+	"displayAlertValidationAfterMilisec": 3000
 };
 
 module.exports = SDC_CONFIG;
diff --git a/catalog-ui/configurations/prod.js b/catalog-ui/configurations/prod.js
index 1b7ae7d..028c44c 100644
--- a/catalog-ui/configurations/prod.js
+++ b/catalog-ui/configurations/prod.js
@@ -429,7 +429,8 @@
 			}
 
 		]
-	}
+	},
+	"displayAlertValidationAfterMilisec": 3000
 };
 
 module.exports = SDC_CONFIG;
diff --git a/catalog-ui/src/app/ng2/components/forms/artifacts-form/artifacts.service.ts b/catalog-ui/src/app/ng2/components/forms/artifacts-form/artifacts.service.ts
index ead85a6..8c5280d 100644
--- a/catalog-ui/src/app/ng2/components/forms/artifacts-form/artifacts.service.ts
+++ b/catalog-ui/src/app/ng2/components/forms/artifacts-form/artifacts.service.ts
@@ -8,6 +8,7 @@
 import { CreateOrUpdateArtifactAction, DeleteArtifactAction } from '../../../store/actions/artifacts.action';
 import { EnvParamsComponent } from '../env-params/env-params.component';
 import { ArtifactFormComponent } from './artifact-form.component';
+import { ModalService } from "../../../services/modal.service";
 
 import {
     CreateInstanceArtifactAction,
@@ -22,6 +23,7 @@
                 private modalService: SdcUiServices.ModalService,
                 private topologyTemplateService: TopologyTemplateService,
                 private translateService: TranslateService,
+                private modalAlertservice: ModalService,
                 private store: Store) {
     }
 
@@ -56,8 +58,13 @@
         const onOkPressed = () => {
             const updatedArtifact = modalInstance.innerModalContent.instance.artifact;
             this.serviceLoader.activate();
+            this.modalAlertservice.openDelayedAlertModal('Please be patient', 'Large files processing may take up to several minutes.', 'Cancel');
             this.dispatchArtifactAction(componentId, componentType, updatedArtifact, artifactType, instanceId, resourceType)
-                    .subscribe().add(() => this.serviceLoader.deactivate());
+                .subscribe().add(() => {
+                this.serviceLoader.deactivate();
+                this.modalAlertservice._shouldDisplayDelayedAlertModal = false;
+                this.modalAlertservice.closeCurrentModal();
+            });
         };
 
         const addOrUpdateArtifactModalConfig = {
@@ -116,7 +123,7 @@
             const updatedArtifact = modalInstance.innerModalContent.instance.artifact;
             this.serviceLoader.activate();
             this.dispatchArtifactAction(componentId, componentType, updatedArtifact, ArtifactType.DEPLOYMENT, instanceId)
-                    .subscribe().add(() => this.serviceLoader.deactivate());
+                .subscribe().add(() => this.serviceLoader.deactivate());
         };
 
         const envParamsModal = {
@@ -160,7 +167,7 @@
         const onOkPressed: Function = () => {
             this.serviceLoader.activate();
             this.store.dispatch((instanceId) ? new DeleteInstanceArtifactAction(artifactObject) : new DeleteArtifactAction(artifactObject))
-                    .subscribe().add(() => this.serviceLoader.deactivate());
+                .subscribe().add(() => this.serviceLoader.deactivate());
         };
 
         const title = this.translateService.translate('ARTIFACT_VIEW_DELETE_MODAL_TITLE');
diff --git a/catalog-ui/src/app/ng2/services/modal.service.ts b/catalog-ui/src/app/ng2/services/modal.service.ts
index a8f1b99..897571b 100644
--- a/catalog-ui/src/app/ng2/services/modal.service.ts
+++ b/catalog-ui/src/app/ng2/services/modal.service.ts
@@ -7,7 +7,7 @@
 import {ModalComponent} from "../components/ui/modal/modal.component";
 import {WizardHeaderBaseComponent} from "app/ng2/components/ui/multi-steps-wizard/multi-steps-wizard-header-base.component";
 import { DynamicComponentService } from 'app/ng2/services/dynamic-component.service';
-
+import { getSdcConfig } from "../config/sdc-config.config.factory";
 
 @Injectable()
 export class ModalService {
@@ -16,7 +16,8 @@
 
     constructor(private dynamicComponentService: DynamicComponentService) { }
 
-    
+    public _shouldDisplayDelayedAlertModal: boolean = true;
+
     /* Shortcut method to open an alert modal with title, message, and close button that simply closes the modal. */
     public openAlertModal(title: string, message: string, closeButtonText?:string) {
         let closeButton: ButtonModel = new ButtonModel(closeButtonText || 'Close', 'grey', this.closeCurrentModal);
@@ -24,6 +25,17 @@
         this.createCustomModal(modalModel).instance.open();
     }
 
+    public openDelayedAlertModal(title: string, message: string,
+                                 closeButtonText?:string) {
+        const timeDelay : number = getSdcConfig().displayAlertValidationAfterMilisec;
+        setTimeout(() => {
+            if(this._shouldDisplayDelayedAlertModal) {
+                this.openAlertModal(title, message, closeButtonText);
+            }
+        }, timeDelay);
+        this._shouldDisplayDelayedAlertModal = true;
+    }
+
     public openErrorModal = (closeButtonText?: string, errorMessage?: string):void => {
         let errorModal = this.createErrorModal(closeButtonText, errorMessage);
         errorModal.instance.open();
@@ -38,7 +50,7 @@
      * @param actionButtonText Blue call to action button
      * @param actionButtonCallback function to invoke when button is clicked
      * @param cancelButtonText text for close/cancel button
-     */    
+     */
     public createActionModal = (title: string, message: string, actionButtonText: string, actionButtonCallback: Function, cancelButtonText: string): ComponentRef<ModalComponent> => {
         let actionButton: ButtonModel = new ButtonModel(actionButtonText, 'blue', actionButtonCallback);
         let cancelButton: ButtonModel = new ButtonModel(cancelButtonText, 'grey', this.closeCurrentModal);
@@ -81,7 +93,7 @@
         return wizardInstance;
     }
 
-    
+
     public closeCurrentModal = () => {
         if (!this.currentModal) return;
         this.currentModal.instance.close();
@@ -106,5 +118,3 @@
 
 
 }
-
-
diff --git a/openecomp-ui/src/sdc-app/config/config.json b/openecomp-ui/src/sdc-app/config/config.json
index c2c7940..b79adf2 100644
--- a/openecomp-ui/src/sdc-app/config/config.json
+++ b/openecomp-ui/src/sdc-app/config/config.json
@@ -12,5 +12,6 @@
     "defaultWebsocketPath": "notification-api/ws/notificationHandler",
     "defaultNotificationsWorkerUpdateMillisecond": 10000,
     "showBrowseVNF": true,
-    "allTestScenario": "onap-dublin"
+    "allTestScenario": "onap-dublin",
+    "displayAlertValidationAfterMilisec": 3000
 }
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js
index 9a177b2..4e31332 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js
@@ -1,5 +1,6 @@
 /*!
  * Copyright © 2016-2018 European Support Limited
+ * Modifications copyright (c) 2021 Nokia
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -51,6 +52,11 @@
     versionStatus
 } from 'sdc-app/common/helpers/ItemsHelperConstants.js';
 
+let shouldDisplayTimingValidationInfo = true;
+let alertValidationTiming = Configuration.get(
+    'displayAlertValidationAfterMilisec'
+);
+
 function getLicensingData(licensingData = {}) {
     const { licenseAgreement, featureGroups } = licensingData;
     const newlicenseAgreement = getValue(licenseAgreement);
@@ -63,6 +69,33 @@
         : undefined;
 }
 
+function getTimingInfoWarning() {
+    return {
+        type: modalActionTypes.GLOBAL_MODAL_WARNING,
+        data: {
+            title: 'Please be patient',
+            msg: 'Large files processing may take up to several minutes.',
+            cancelButtonText: i18n('Cancel')
+        }
+    };
+}
+
+function displayTimingValidationInfo(dispatch) {
+    shouldDisplayTimingValidationInfo = true;
+    setTimeout(() => {
+        if (shouldDisplayTimingValidationInfo) {
+            dispatch(getTimingInfoWarning());
+        }
+    }, alertValidationTiming);
+}
+
+function closeTimingValidationInfo(dispatch) {
+    shouldDisplayTimingValidationInfo = false;
+    dispatch({
+        type: modalActionTypes.GLOBAL_MODAL_CLOSE
+    });
+}
+
 function baseUrl() {
     const restPrefix = Configuration.get('restPrefix');
     return `${restPrefix}/v1.0/vendor-software-products/`;
@@ -345,6 +378,7 @@
     },
 
     processAndValidateHeatCandidate(dispatch, { softwareProductId, version }) {
+        displayTimingValidationInfo(dispatch);
         return validateHeatCandidate(softwareProductId, version).then(
             response => {
                 if (response.status === 'Success') {
@@ -362,6 +396,7 @@
                         version
                     });
                 }
+                closeTimingValidationInfo(dispatch);
             }
         );
     },
@@ -374,7 +409,7 @@
             type: HeatSetupActions.FILL_HEAT_SETUP_CACHE,
             payload: {}
         });
-
+        displayTimingValidationInfo(dispatch);
         Promise.resolve()
             .then(() => uploadFile(softwareProductId, formData, version))
             .then(response => {
@@ -410,20 +445,25 @@
                             });
                             break;
                     }
+                    closeTimingValidationInfo(dispatch);
                 } else {
                     throw new Error(parseUploadErrorMsg(response.errors));
                 }
             })
             .catch(error => {
-                dispatch({
-                    type: modalActionTypes.GLOBAL_MODAL_ERROR,
-                    data: {
-                        title: failedNotificationTitle,
-                        msg:
-                            error.message ||
-                            (error.responseJSON && error.responseJSON.message)
-                    }
-                });
+                dispatch(
+                    {
+                        type: modalActionTypes.GLOBAL_MODAL_ERROR,
+                        data: {
+                            title: failedNotificationTitle,
+                            msg:
+                                error.message ||
+                                (error.responseJSON &&
+                                    error.responseJSON.message)
+                        }
+                    },
+                    closeTimingValidationInfo(dispatch)
+                );
             });
     },
 
