Major Performance issue even with new caching?
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- openapi, php
- Lĩnh vực
- api, performance
Hướng nghiên cứu
Bắt đầu với bản tái hiện tối thiểu tại github.com/lextira/openapi-parse-test và chạy test.php trên fork dựa trên v1.4 cũng như bản phát hành chính thức v1.6. Điều tra đường dẫn phân giải tham chiếu và hành vi bộ nhớ đệm, sử dụng đặc tả OpenAPI được liên kết làm workload. Được xem là hoàn tất khi đường dẫn v1.6 không còn cho thấy hồi quy parsing đã được báo cáo so với fork.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi @cebe
Almost 2 years ago we had a rather big issue with the performance for parsing an API-spec, where all components were store in another (the same) file. It took a couple of minutes to process. My collegue then proposed this PR #65
We ended up using this fork for the last two years now. This week I'm updating dependencies, and having seen that you merged #67 made me realize, that I can finally get rid of our fork.
However, running our test-suite after the update was rather painful: Instead of ~1s to parse our specification, like with our fork, it now took ~30s. I spent a couple of hours analyzing, but I couldn't find the issue. It looks like resolving references is painfully slow, it seems to take 100-300ms for each reference. Clearly, this was much faster in version 1.4, where our fork originates.
Therefore, I hope you can find a minute to look into it as well. I prepared a minimal test setup:
$ git clone https://github.com/lextira/openapi-parse-test
$ composer update
# now we have a composer install with our fork, see https://github.com/lextira/openapi-parse-test/blob/master/composer.json
$ php test.php
Start Reading...
Read took 1248 miliseconds!
Parsed file is 791837 characters long.
$ git checkout with-openapi-1.6
$ composer update
# new we are at the latest release of the official repository
$ php test.php
Start Reading...
Read took 37302 miliseconds!
Parsed File is 791837 characters long.
So with v1.6, reading the exact same file from the exact same URL takes almost 30 times longer than with v1.4 (and our custom cache implementation, which is very similar to your implemented cache now). For context, the specification used for the test is our official API documentation and can be found here: https://docs.lexgate.ch/api/
- Ngôn ngữ chính
- PHP
- Star
- 500
- Fork
- 99
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cebe/php-openapi
-
Deprecated warnings in PHP 8.2 Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
cebe/php-openapi#250 ·
-
BC break in 1.8 Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
cebe/php-openapi#247 · 1 bình luận · 1 reaction ·
-
php 8.4 deprecations Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
cebe/php-openapi#245 · 3 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
cebe/php-openapi#242 · 6 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
cebe/php-openapi#238 ·
Tất cả issue của cebe/php-openapi
Issue tương tự
-
tooling
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
UX
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
ProfessionalWiki/NeoWiki#1525 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug customer-reported
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
MagnaCapax/PMSS#949 ·
-
responsive-media kses allow-list strips clipPathUnits, collapsing objectBoundingBox clip paths Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Automattic/static-site-importer#1829 ·