หลีกเลี่ยงคําขอในจุดคอขวด
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ภาพรวม
การตรวจสอบนี้จะระบุคำขอที่ทำงานเป็นเวลานานซึ่งบล็อกคำขอโฆษณาแรก คำขอเหล่านี้เป็นคำขอที่เริ่มขึ้นแล้วและได้รับการตอบกลับก่อนที่จะมีการส่งคำขอโฆษณาแรก การลดจํานวนและระยะเวลาของคําขอที่บล็อกเหล่านี้จะลดเวลาในการตอบสนองของคําขอโฆษณาแรกซึ่งทําให้โฆษณาโหลดเร็วขึ้น
การแนะนำวิดีโอ
รายละเอียดของการตรวจสอบนี้ประกอบด้วยคําขอที่บล็อก 5 อันดับแรก (ตามต้นทุน) เป้าหมายก็คือการนำออกหรือลดระยะเวลาของคำขอเหล่านี้เพื่อเร่งการโหลดโฆษณา เคล็ดลับบางประการสำหรับการดำเนินการนี้ ได้แก่
- การกำจัดคำขอที่ไม่จำเป็น
- การเลื่อนการส่งคำขอที่ไม่สำคัญไปก่อนจนกว่าจะโหลดโฆษณาเสร็จ
- การออกคำขอพร้อมกันแทนการออกตามลำดับ
- การปรับปรุงเวลาในการตอบสนองโดยการเพิ่มประสิทธิภาพบริการแบ็กเอนด์โดยใช้ HTTP/2 เป็นต้น
การตรวจสอบนี้จะแสดงคําขอที่ทำให้เกิดจุดคอขวด 5 อันดับแรกตามต้นทุน ระบบจะคำนวณค่าใช้จ่าย
ของคำขอดังนี้
request duration + (request self-time * 3)
เมื่อระยะเวลาของตัวคำขอมีค่าเท่ากับระยะเวลาลบด้วยเวลาที่ถูกบล็อกโดยคำขออื่นๆ ระบบจะพิจารณาเฉพาะคำขอที่ระยะเวลาของตัวคำขอเองนานกว่า 250 มิลลิวินาทีหรือระยะเวลาที่นานกว่า 1 วินาทีเท่านั้น
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eThis audit focuses on identifying and mitigating long-running requests that delay the initial ad request, ultimately hindering ad loading speed.\u003c/p\u003e\n"],["\u003cp\u003eBy reducing or removing these "blocking requests," publishers can significantly improve the latency of their first ad request.\u003c/p\u003e\n"],["\u003cp\u003eOptimization strategies include eliminating unnecessary requests, deferring non-critical requests, parallelizing request execution, and enhancing backend service response times.\u003c/p\u003e\n"],["\u003cp\u003eThe audit highlights the top 5 most impactful blocking requests based on a calculated "cost" that factors in request duration and self-time.\u003c/p\u003e\n"],["\u003cp\u003eRequests with self-times exceeding 250ms or durations longer than 1s are flagged for potential optimization to improve ad loading performance.\u003c/p\u003e\n"]]],["The audit identifies long-running requests that delay the first ad request. It highlights the top five blocking requests based on their calculated cost. Actions to reduce delays include eliminating or deferring non-critical requests, issuing requests in parallel, and improving response times. The cost of a request is its duration plus three times its self-time (duration minus blocked time). Only requests with self-time above 250ms or duration above 1s are considered.\n"],null,["# Avoid bottleneck requests\n\nOverview\n--------\n\nThis audit identifies long-running requests that are blocking the first ad\nrequest. These are requests that were initiated and which also received a\nresponse before the first ad request was made. Reducing the number and duration\nof these blocking requests will reduce the latency of the first ad request,\nspeeding up ad loading.\n\nRecommendations\n---------------\n\nThe details of this audit contain the top 5 blocking requests\n([by cost](#more_information)). The goal here is to remove or reduce the\nduration of these requests to speed up ad loading. Some tips for doing this\ninclude:\n\n- Eliminating unnecessary requests.\n- Deferring non-critical requests until after ads are loaded.\n- Issuing requests in parallel rather than serially.\n- Improving response times by optimizing backend services, using HTTP/2, etc.\n\nMore information\n----------------\n\nThis audit displays the top 5 bottleneck requests by cost. The cost of a request\nis computed as follows:\n\n`request duration + (request self-time * 3)`\n\nWhere request self-time is equal to duration minus time spent blocked by other\nrequests. Only requests with a self-time greater than 250ms or a duration\ngreater than 1s are considered. \n[View audit source](https://github.com/googleads/publisher-ads-lighthouse-plugin/tree/HEAD/lighthouse-plugin-publisher-ads/audits/bottleneck-requests.js) [Improve this article](https://github.com/googleads/publisher-ads-lighthouse-plugin/tree/HEAD/docs/audits/bottleneck-requests.md) [Report an issue](https://github.com/googleads/publisher-ads-lighthouse-plugin/issues/new?labels=documentation&template=documentation-feedback.md&title=Documentation+feedback%3A+bottleneck-requests.md)\n\n\u003cbr /\u003e"]]