Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Massive tree action speedup #50

Merged
merged 1 commit into from Apr 1, 2013
Merged

Massive tree action speedup #50

merged 1 commit into from Apr 1, 2013

Conversation

seveas
Copy link
Contributor

@seveas seveas commented Aug 3, 2012

The tree action used to use $tree_obj->tree to get all tree entries.
This is ridiculously slow as it loads all blobs via git cat-file.
Instead, expose directory_entries from the underlying Git::PurePerl
object and use it instead.

This also required moving _mode_str (now mode_string for consistency) to
Gitalist::Utils so it could be used in the template.

The tree action used to use $tree_obj->tree to get all tree entries.
This is ridiculously slow as it loads all blobs via git cat-file.
Instead, expose directory_entries from the underlying Git::PurePerl
object and use it instead.

This also required moving _mode_str (now mode_string for consistency) to
Gitalist::Utils so it could be used in the template.
@broquaint
Copy link
Owner

Thanks for this @seveas but it looks to break the interface behind the AJAX requests in the tree view that provide the last commit for a given file/directory. It wasn't obvious at a quick glance where the breakage lies.

@seveas
Copy link
Contributor Author

seveas commented Sep 28, 2012

Strange, that isn't broken for me, the commit info is still loaded.

@seveas
Copy link
Contributor Author

seveas commented Sep 28, 2012

Example of something I see in the debug log:

[info] *** Request 47 (1.119/s) [29081] [Fri Sep 28 13:38:52 2012] ***
[debug] Path is "/fragment/ref/file_commit_info"
[debug] Arguments are "test.pl"
[debug] "GET" request for "fragment/Gitalist/f1dceb904c530c9ad608f5c9ef26a7e5f855dc09/file_commit_info/test.pl" from "127.0.0.1"
[debug] Response Code: 200; Content-Type: application/json; Content-Length: 110
[info] Request took 0.172995s (5.781/s)

What do you get instead?

@broquaint broquaint merged commit eb8ee28 into broquaint:master Apr 1, 2013
@broquaint
Copy link
Owner

Sorry it took so long and thanks for the hard work!

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.

None yet

2 participants