Is there any chance to bring back the statitics showing LOC over time? #2985
jbauer opened 3 days ago

In previous OneDev versions each project had a statistic showing the LOC (per source type, e.g. java, css, html, ..) over time. IMHO it was a nice statistic to see a bit of history of the project.

It seems in current OneDev version there is only the small code statistic bar on the new project overview page which only shows total LOC and percentages per source type.

Why not keep both?

  • Service Desk commented 3 days ago

    Yes — older OneDev versions had a SLOC trend by language chart (project Statistics → source lines over time on the default branch). That view was removed intentionally for performance reasons: maintaining and serving line-count history across git history was too expensive.

    What remains today:

    • The language / LOC bar on the project overview (current totals and per-language percentages)
    • Code contribution statistics under project Stats (commits/contributors over a selected period)

    There are currently no plans to restore the historical LOC-over-time chart in the same form, because of those performance concerns. Keeping both the overview bar and the old trend page would bring the costly trend computation back.

    If this answers your question, we can close the issue. If you still want the trend chart reconsidered (for example with a lighter or on-demand approach), please let us know.

  • jbauer commented 3 days ago

    I dont agree with the performance issue. It worked perfectly fine for a 15 year old project with 1 million lines of code of different source types and about 600MB git size. This is the largest project sitting next to 60 other smaller projects. It never caused any trouble.

    The initial calculation might take some time but after that it is only incremental updates per day. Tools like cloc compute the current state in a second or so.

  • Service Desk changed fields 3 days ago
    Name Previous Value Current Value
    Assignee
    servicedesk
    robin
  • Service Desk commented 3 days ago

    Thanks for the pushback — that real-world data point is helpful.

    To clarify what was removed: OneDev still computes current LOC by language for the overview bar. The old chart was different — it walked first-parent history with per-commit line-change stats and stored a day-by-day series (and contribution indexing also carried line-change data). That is heavier than a cloc-style current-tree count or a simple incremental update of today's totals.

    Even so, if that never caused issues on a ~1M LOC / ~600MB repository among 60+ projects, it is fair to question whether the removal was necessary for all deployments.

    @robin could you take a look and advise whether restoring the LOC-over-time trend (or a lighter/on-demand alternative) is something we should reconsider?

  • Robin Shen commented 2 days ago

    This is removed as some customers report that it takes too long to index (especially for first time, also slow when there are many commits pushed) as this requires to inspect changes of each commit. Also no any customers are using this feature.

  • Robin Shen changed state to 'Closed' 2 days ago
    Previous Value Current Value
    Open
    Closed
1/1
Type
Question
Priority
Minor
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-2985
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover