পারফরম্যান্সের উন্নতি
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
এই নথিতে আপনি আপনার অ্যাপ্লিকেশনের কার্যকারিতা উন্নত করতে ব্যবহার করতে পারেন এমন কৌশলগুলি কভার করে৷ আপনি যে নির্দিষ্ট API ব্যবহার করছেন তার ডকুমেন্টেশনে এই কয়েকটি বিষয়ে আরও বিশদ সহ একটি অনুরূপ পৃষ্ঠা থাকা উচিত। উদাহরণস্বরূপ, Google ড্রাইভ API-এর জন্য পারফরম্যান্স টিপস পৃষ্ঠাটি দেখুন।
জিজিপ সম্পর্কে
এই ক্লায়েন্ট লাইব্রেরি সমস্ত API প্রতিক্রিয়াগুলির জন্য gzip কম্প্রেশনের অনুরোধ করে এবং আপনার জন্য ডেটা আনজিপ করে৷ যদিও ফলাফলগুলিকে কম্প্রেস করার জন্য অতিরিক্ত CPU সময় প্রয়োজন, নেটওয়ার্ক খরচের সাথে ট্রেডঅফ সাধারণত এটিকে সার্থক করে তোলে।
আংশিক প্রতিক্রিয়া (ক্ষেত্র পরামিতি)
ডিফল্টরূপে, সার্ভার অনুরোধ প্রক্রিয়াকরণের পরে একটি সম্পদের সম্পূর্ণ উপস্থাপনা ফেরত পাঠায়। ভালো পারফরম্যান্সের জন্য, আপনি সার্ভারকে শুধুমাত্র আপনার প্রয়োজনীয় ক্ষেত্রগুলি পাঠাতে এবং পরিবর্তে একটি আংশিক প্রতিক্রিয়া পেতে বলতে পারেন।
একটি আংশিক প্রতিক্রিয়া অনুরোধ করতে, যেকোনো API পদ্ধতিতে মানক Fields
প্যারামিটার যোগ করুন। এই প্যারামিটারের মানটি নির্দিষ্ট করে যে ক্ষেত্রগুলি আপনি ফেরত দিতে চান। আপনি এই প্যারামিটারটি যেকোন অনুরোধের সাথে ব্যবহার করতে পারেন যা প্রতিক্রিয়া ডেটা প্রদান করে।
নিম্নলিখিত কোড স্নিপেটে, আবিষ্কার পরিষেবার GetRest
পদ্ধতি বলা হয়। Fields
প্যারামিটারের মান description,title
সেট করা আছে। ফলস্বরূপ, প্রত্যাবর্তিত বস্তু শুধুমাত্র বর্ণনা এবং শিরোনাম ক্ষেত্র অন্তর্ভুক্ত করবে।
var service = new DiscoveryService();
var request = service.Apis.GetRest("calendar", "v3");
request.Fields = "description,title";
var result = request.Execute();
লক্ষ্য করুন কীভাবে পছন্দসই ক্ষেত্রগুলিকে সীমাবদ্ধ করতে কমা ব্যবহার করা হয় এবং প্যারেন্ট ক্ষেত্রগুলিতে থাকা ক্ষেত্রগুলিকে নির্দেশ করতে স্ল্যাশগুলি ব্যবহার করা হয়। Fields
পরামিতি জন্য অন্যান্য বিন্যাস বিকল্প আছে; বিশদ বিবরণের জন্য, আপনি যে API ব্যবহার করছেন তার ডকুমেন্টেশনে "পারফরম্যান্স টিপস" পৃষ্ঠাটি দেখুন।
আংশিক আপডেট (প্যাচ)
আপনি যে API কল করছেন সেটি যদি প্যাচ সমর্থন করে, তাহলে সম্পদ পরিবর্তন করার সময় আপনি অপ্রয়োজনীয় ডেটা পাঠানো এড়াতে পারেন। এই APIগুলির জন্য, আপনি Patch
পদ্ধতিতে কল করতে পারেন এবং সম্পদের জন্য আপনি যে আর্গুমেন্টগুলি পরিবর্তন করতে চান তা সরবরাহ করতে পারেন।
প্যাচ শব্দার্থবিদ্যা সম্পর্কে আরও তথ্যের জন্য, আপনি যে APIটি ব্যবহার করছেন তার ডকুমেন্টেশনে "পারফরম্যান্স টিপস" পৃষ্ঠাটি দেখুন।
ব্যাচ
আপনি যদি অনেকগুলি ছোট অনুরোধ পাঠান তবে আপনি ব্যাচিং থেকে উপকৃত হতে পারেন, যা সেই অনুরোধগুলিকে একটি একক HTTP অনুরোধে বান্ডিল করার অনুমতি দেয়।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThis document provides techniques to enhance your application's performance by reducing network costs and unnecessary data transfers.\u003c/p\u003e\n"],["\u003cp\u003eUtilize the \u003ccode\u003eFields\u003c/code\u003e parameter for partial responses, retrieving only the necessary data from the server.\u003c/p\u003e\n"],["\u003cp\u003eEmploy \u003ccode\u003ePatch\u003c/code\u003e for partial updates, sending only modified data when making changes to resources.\u003c/p\u003e\n"],["\u003cp\u003eLeverage batching to combine multiple small requests into a single HTTP request, reducing overhead.\u003c/p\u003e\n"],["\u003cp\u003eConsult the specific API documentation's "Performance Tips" page for detailed guidance on these techniques.\u003c/p\u003e\n"]]],[],null,["# Improve Performance\n\nThis document covers techniques you can use to improve the performance of your application.\nThe documentation for the specific API you are using should have a\nsimilar page with more detail on some of these topics.\nFor example, see the\n[Performance Tips page for the Google Drive API](/drive/performance).\n\nAbout gzip\n----------\n\n\nThis client library requests gzip compression for all API responses and unzips\nthe data for you.\nAlthough this requires additional CPU time to uncompress the results,\nthe tradeoff with network costs usually makes it worthwhile.\n\nPartial response (fields parameter)\n-----------------------------------\n\n\nBy default, the server sends back the full representation of a resource after processing requests.\nFor better performance,\nyou can ask the server to send only the fields you really need and get a *partial response* instead.\n\n\nTo request a partial response,\nadd the standard `Fields` parameter to any API method.\nThe value of this parameter specifies the fields you want returned.\nYou can use this parameter with any request that returns response data.\n\n\nIn the following code snippet,\nthe `GetRest` method of the Discovery service is called.\nThe value of the `Fields` parameter is set to `description,title`.\nAs a result, the returned object will include only the description and title fields. \n\n```gdscript\nvar service = new DiscoveryService();\nvar request = service.Apis.GetRest(\"calendar\", \"v3\");\nrequest.Fields = \"description,title\";\nvar result = request.Execute();\n \n```\n\n\nNote how commas are used to delimit the desired fields,\nand slashes are used to indicate fields that are contained in parent fields.\nThere are other formatting options for the `Fields` parameter;\nfor details, see the \"Performance Tips\" page\nin the documentation for the API you are using.\n\nPartial update (patch)\n----------------------\n\n\nIf the API you are calling supports patch,\nyou can avoid sending unnecessary data when modifying resources.\nFor these APIs, you can call the `Patch` method and\nsupply the arguments you wish to modify for the resource.\n\n\nFor more information about patch semantics,\nsee the \"Performance Tips\" page in the documentation for the API you are using.\n\nBatch\n-----\n\n\nIf you are sending many small requests you may benefit from\n[batching](/api-client-library/dotnet/guide/batch),\nwhich allows those requests to be bundled into a single HTTP request."]]