Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

GCS plugin is very slow in admin media grid mode #75

Open

Description

@kientv

When I access Media library (grid mode), GCS plugin call google storage many time (each image a time).
And it's take more than 20s for showing all image in first page.

`Content-Type: application/json
x-goog-api-client: gl-php/8.0.7 gccl/1.25.1 wp-gcs/0.1.6 wp/5.7.2

  • Mark bundle as not supporting multiuse
    < HTTP/1.1 200 OK
    < X-GUploader-UploadID: ADPycdvVsGkb8xYAvA5DgqMmrfU9NV5x5_Zlpkzl5Yhr7LuBsEh9gwwMkE_yEisq5rC6plV7SckuWR_8X3jrGdIuLmsvKf4qOQ
    < Content-Type: application/json; charset=UTF-8
    < Date: Wed, 06 Oct 2021 03:12:07 GMT
    < Vary: Origin
    < Vary: X-Origin
    < Cache-Control: private, max-age=0, must-revalidate, no-transform
    < Expires: Wed, 06 Oct 2021 03:12:07 GMT
    < Content-Length: 2
    < Server: UploadServer
    < Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
    <
  • Connection #0 to host storage.googleapis.com left intact
  • Found bundle for host storage.googleapis.com: 0x7f66093b14e0 [serially]
  • Re-using existing connection! (#0) with host storage.googleapis.com
  • Connected to storage.googleapis.com (216.58.200.80) port 443 (#0)

GET /storage/v1/b/bucket_name/o/1%2F2021%2F09%2Fmac3-scaled.jpg?prettyPrint=false HTTP/1.1
Host: storage.googleapis.com
User-Agent: gcloud-php/1.25.1
Authorization: Bearer ...`

This is profiling in webgrind:
image

Activity

  1. kientv commented on Oct 12, 2021

    @kientv
    Author

    php::curl_exec has been called 121 times each request.
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions