Skip to content

performance optimizations for big repos#1277

Open
jung-kim wants to merge 19 commits intoFredrikNoren:masterfrom
jung-kim:1091-a
Open

performance optimizations for big repos#1277
jung-kim wants to merge 19 commits intoFredrikNoren:masterfrom
jung-kim:1091-a

Conversation

@jung-kim
Copy link
Collaborator


Prevent full gitlog history from server to client and load only what is needed

Upon page load, client will make and API call to get list of git nodes. However, this call gets list of ALL nodes every time. i.e. if a pages is showing 300 nodes and user scrolls down asking for 25 more nodes, backend will return 325 nodes, not just the 25 nodes needed.

This is now fixed and backend will return only the nodes client needs.

Prevent redundant ref and node calculations per each /gitlog api call
One of the biggest performance hit for big repos was due to git refs calculations because ungit loads ALL

refs, local and remote branches and tags of it's history.

This is needed to some degree to display them in the branch drop down and etc, but there were some inefficiencies on logic that thinking these refs had valid nodes and did unnecessary calculations.

@jung-kim jung-kim mentioned this pull request Feb 14, 2020
Copy link
Collaborator

@campersau campersau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.parents(logEntry.parents || []);
this.commitTime = logEntry.commitDate;
this.date = Date.parse(this.commitTime);
this.timestamp = logEntry.timestamp || Date.parse(this.commitTime);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the commitDate is already parsed on the server is the fallback here still required?

Suggested change
this.timestamp = logEntry.timestamp || Date.parse(this.commitTime);
this.timestamp = logEntry.timestamp;

Co-Authored-By: campersau <buchholz.bastian@googlemail.com>
@wmertens
Copy link
Contributor

I think this can be closed, see #1461

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants