You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Devesh Kumar Singh (Jira)" <ji...@apache.org> on 2025/06/23 12:19:00 UTC

[jira] [Created] (HDDS-13324) Ozone Recon - Optimize memory footprint for listKeys API.

Devesh Kumar Singh created HDDS-13324:
-----------------------------------------

             Summary: Ozone Recon - Optimize memory footprint for listKeys API.
                 Key: HDDS-13324
                 URL: https://issues.apache.org/jira/browse/HDDS-13324
             Project: Apache Ozone
          Issue Type: Task
          Components: Ozone Recon
    Affects Versions: 2.0.0
            Reporter: Devesh Kumar Singh
            Assignee: Devesh Kumar Singh


While constructing full path prefix in constructFullPathPrefix method, below code can be expensive:
{code:java}
fullPath.insert(0, nsSummary.getDirName() + OM_KEY_PREFIX);{code}
 * Inserting at position {{0}} in a {{StringBuilder}} has *O(n)* cost because it must shift the entire buffer every time.

 * For deeply nested paths (e.g., {{{}/a/b/c/d/e/f/g/...{}}}), this compounds quickly.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org