Performance degradation on ProjectsController#show by checking forkable
Summary
Performance degradation on ProjectsController#show by checking the project can be forked by gitlab-foss!14551 (merged) (gitlab-foss#38462 (closed)).
Steps to reproduce
Just access to some project to see how slow ProjectsController#show is.
What is the current bug behavior?
To show ProjectsController#show is slow (takes 5800 ms for some project provided by gitlab-development-kit)
What is the expected correct behavior?
To show ProjectsController#show should be faster (will take only 3600 ms for some project provided by gitlab-development-kit if gitlab-foss!14551 (merged) is removed)
Output of checks
On GitLab CE master, prepared with the GDK on a local macOS.
This bug happens on GitLab.com (EE 10.6.0)
Possible fixes
Remove checking if the project can be forked by the user.
Edited by Takuya Noguchi