Project

General

Profile

Actions

Task #4120

open

[ce] replace get_repo_nodes api

Added by Daniel D over 8 years ago. Updated over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
24.07.2016
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:

Description

The current get_repo_nodes api loads the entire repo in one go, for a large repo (gbs) this will result in an output at least the size of the repo, which can cause memory issues, currently issue #4114 adds a max_file_bytes to work around this issue for the full text search indexer but a more long term solution is required:

Splitting get_repo_nodes into 2 actions, one to get the nodes, another to get node data should solve this, also since getting node content one by one would be slow it would be a good idea to allow batch node retrieval.

The methods required would go along the lines of:

get_repo_nodes(repo_name, version, node_paths)
=>[
{'path': '/README', 'size': 434},
{'path': '.gitconfig', 'size': 53},
{'path': '/some/file', 'size': 5223},
{'path': '/another/file', 'size': 6433}
]

get_node_content('somerepo', 'tip', ['/README', '/some/file']) =>  contents of those 2 files only
Actions

Also available in: Atom PDF