perf(Audit): Audit log pagination is expensive

Đang mở
#8,856 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
postgresql, python
Lĩnh vực
backend, databases, performance

Hướng nghiên cứu

Start by locating the audit log list endpoints and how they apply page-number pagination; inspect the count query and the indexes added for #8846. The issue identifies the expensive per-request count as the problem, but does not specify a replacement pagination approach. Done should reduce the cost of listing audit logs on large projects while preserving the endpoint behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

The audit log list endpoints use page-number pagination, which runs SELECT COUNT(*) on every request to work out the total and the last page. The count reads every audit log row that matches the filters, so its cost grows with the size of the project's audit log, even when the client only asks for the first page.

On large projects, the count can take up to 500 ms. Indexes added for #8846 make this cheaper, but it's still a lot

Ngôn ngữ chính
Python
Star
7.1k
Fork
603
Merge trung bình
3 ngày 8 giờ
Pull request đã merge (30 ngày)
102

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Flagsmith/flagsmith

Tất cả issue của Flagsmith/flagsmith

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.