Optimize Media Planning by skipping thumbnail generation
This change modifies the validation/planning phase to skip the expensive thumbnail generation step in 'getUnifiedMediaState'. Since the planning phase primarily needs file IDs and names to calculate deletions, adoptions, and reorders, skipping the thumbnail verification/retrieval (including sidecar checks) significantly reduces the latency of the 'Save Changes' operation.
This commit is contained in:
@ -33,6 +33,22 @@ export class MockShopifyMediaService implements IShopifyMediaService {
|
||||
return []
|
||||
}
|
||||
|
||||
getProduct(productId: string): any {
|
||||
return {
|
||||
id: productId,
|
||||
title: "Mock Product",
|
||||
handle: "mock-product",
|
||||
onlineStoreUrl: "https://mock-shop.myshopify.com/products/mock-product"
|
||||
}
|
||||
}
|
||||
|
||||
getProductWithMedia(productId: string): any {
|
||||
return {
|
||||
product: this.getProduct(productId),
|
||||
media: this.getProductMedia(productId)
|
||||
};
|
||||
}
|
||||
|
||||
productDeleteMedia(productId: string, mediaId: string): any {
|
||||
return {
|
||||
productDeleteMedia: {
|
||||
|
||||
Reference in New Issue
Block a user