[PR #873] [MERGED] Do not read the objects data on list #995

Closed
opened 2026-03-03 12:32:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/873
Author: @ironsmile
Created: 7/29/2022
Status: Merged
Merged: 5/3/2023
Merged by: @fsouza

Base: mainHead: do-not-read-object-data-on-list


📝 Commits (2)

  • 0bf4764 Do not read the objects data on list
  • 196c354 backend/fs: make sure name and bucket are set in attrs

📊 Changes

1 file changed (+28 additions, -14 deletions)

View changed files

📝 internal/backend/fs.go (+28 -14)

📄 Description

I am back with my object listing improvements 😄

This optimization takes advantage of the fact that the object metadata
could now be read from disk without reading its data. Previously the
whole file was read from disk in order to obtain its size and nothing
more. Instead, now a simple Stat is used.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fsouza/fake-gcs-server/pull/873 **Author:** [@ironsmile](https://github.com/ironsmile) **Created:** 7/29/2022 **Status:** ✅ Merged **Merged:** 5/3/2023 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `main` ← **Head:** `do-not-read-object-data-on-list` --- ### 📝 Commits (2) - [`0bf4764`](https://github.com/fsouza/fake-gcs-server/commit/0bf47643bfc82c7ee8d65efd91fd7c672a85dd07) Do not read the objects data on list - [`196c354`](https://github.com/fsouza/fake-gcs-server/commit/196c354d0a16c15a9bf32a5d23a699540bb5161a) backend/fs: make sure name and bucket are set in attrs ### 📊 Changes **1 file changed** (+28 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `internal/backend/fs.go` (+28 -14) </details> ### 📄 Description I am back with my object listing improvements :smile: This optimization takes advantage of the fact that the object metadata could now be read from disk without reading its data. Previously the whole file was read from disk in order to obtain its size and nothing more. Instead, now a simple Stat is used. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:32:35 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#995
No description provided.