Checking for empty repositories is too expensive after bitbucket startup

Description

Last minute during the dashboard development, we added a check to count empty repositories as "secure" on the project level.
Since empty repositories have no branches, they could never be marked as secure otherwise because we can't trigger a scan.

However, testing on AWS shows that `RepositoryService.isEmpty` can be very slow – sometimes taking 10+ seconds on the first call. Here's a profiler log from testing;

Environment

None

Assignee

Unassigned

Reporter

George V @Mohami

Sprint

None

Labels

None

Github URL

None

Priority

Low
Configure