أفضل الممارسات المتعلّقة بالأداء
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تستغرق عملية تحميل المنتجات وقتًا معيّنًا. إذا كنت بحاجة
إلى تحميل عدة منتجات في إطار زمني قصير، قد يؤدي ذلك إلى
العملية تبدو بطيئة.
الحل الذي ننصح به هو استدعاء واجهة برمجة تطبيقات CSS بشكل متوازٍ.
المكالمات المتوازية
لتسريع عملية التحميل، ننصحك باستخدام طلبات الاتصال الموازية لتحميل المحتوى.
منتجات متعددة في وقت واحد. ويمكن أن يؤدي ذلك إلى تقليل الانبعاثات
وقت التحميل. استخدام الميزات المناسبة
للغة البرمجة الخاصة بك.
بالنسبة إلى Java، استخدم الإصدار غير المتزامن في برنامج تنفيذ متوازٍ:
ApiFuture<CssProductInput> future =
cssProductInputsServiceClient.insertCssProductInputCallable().futureCall(request);
العمليات المجمّعة / المجمّعة
لا تتوفر العمليات المجمّعة والمجمّعة بشكل مباشر في CSS
واجهة برمجة التطبيقات، إذا كنت تستدعي واجهة برمجة التطبيقات مباشرةً باستخدام HTTP، يمكنك استخدام واجهة برمجة التطبيقات Google API.
ميزة الدفعة التلقائية. للحصول على تعليمات تفصيلية، يُرجى الرجوع إلى
Media-CDN (شبكة توصيل محتوى الوسائط)
أو خدمة Cloud Storage
التوثيق.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eUploading many products using the CSS API can be time-consuming due to individual operation times.\u003c/p\u003e\n"],["\u003cp\u003eTo expedite the upload process, leverage parallel calls to upload multiple products concurrently, significantly reducing the overall upload time.\u003c/p\u003e\n"],["\u003cp\u003eThough the CSS API doesn't directly support bulk/batch operations, when using HTTP directly, you can utilize the Google API default batch feature for enhanced efficiency, as detailed in the Media-CDN or Cloud Storage documentation.\u003c/p\u003e\n"]]],[],null,["# Performance best practices\n\nUploading products takes a certain amount of time per operation. If you need\nto upload many products in a short timeframe, this could cause the\nprocess to seem slow.\n\nOur recommended solution is to call the CSS API in parallel.\n\nParallel calls\n--------------\n\nTo speed up the upload process, we recommend using parallel calls to upload\nmultiple products simultaneously. This can significantly reduce overall\nupload time. Use the features appropriate\nfor your programming language.\n\nFor Java, use the asynchronous version within a parallel executor: \n\n ApiFuture\u003cCssProductInput\u003e future =\n cssProductInputsServiceClient.insertCssProductInputCallable().futureCall(request);\n\nBulk / Batch operations\n-----------------------\n\nWhile bulk and batch operations aren't supported directly in the CSS\nAPI, if you are calling the API directly using HTTP you can use the Google API\ndefault batch feature. For detailed instructions, refer to the\n[Media-CDN](https://cloud.google.com/media-cdn/docs/api/batch)\nor the [Cloud Storage](https://cloud.google.com/storage/docs/batch)\ndocumentation."]]