Possbility of optimisations? (OD-1215)
Closed
Unknown opened 1 year ago

Hello,

So this is just a discussion, and I doubt you would be able to do this due to human nature. So taking a look at this:

https://code.onedev.io/onedev/server/~stats/lines

Onedev lines of code is rapidly increasing, which is a concern because the more lines of code the harder the codebase is to maintain.

You are a single developer, and thus only have one point of view (and maybe a few inactive contributors) looking at the codebase.

Lines of code is not the best method of testing if something is efficient, sometimes things are more efficient with more lines of code, its just how it works with high level languages.

My main question here is, you have been working on the codebase for many MANY years, some parts of the codebase have never been revisisted, is there anything you are aware of, or any possibility of possible optimisations which could be made? If so where do you think it would be?

Also I would like to highlight something else I have noticed based on optimisation. It does not seem like the git repositories which onedev creates are having git gc ran over them, or if it is, very infrequently. This is important for large projects to ensure that the gc is in fact being executed, and it is not in the post push hook because check I pushed to onedev and analysed the size of the repository over time, gc ran manually optimised it, without doing it manually it remained unoptimised.

This could be an isolated incident, but would warrant looking into, especially considering you use onedev for dogfooding.

Robin Shen commented 1 year ago

some parts of the codebase have never been revisisted, is there anything you are aware of, or any possibility of possible optimisations which could be made? If so where do you think it would be?

If they work fine, why I need to revisit them constantly? Please raise bug if there is a real problem.

As to git GC, there is a separate issue mentioning it already. But I don't think it is a hurry as Git in the background does some degree of GC upon push. Until now, I did not get any report of GC issue yet. Let's address it if it becomes a real problem.

Robin Shen commented 1 year ago

some parts of the codebase have never been revisisted

Also how do you know the code base has never been revisited? I am keeping refactoring here and there frequently.

Unknown commented 1 year ago

Refactoring doesnt mean reviewing :)

you mention you want onedev to grow, therefore a second set of eyes are needed, I am sure you are an amazing Java developer, but you are a human being, second set of eyes is needed in every codebase.

That is what I meant by not being revisited, unfortunately onedev is a huge codebase now and it means its a massive chore for any developer to read the src and find issues.

more code more attack surface, its why openbsd products are very simple, more secure if you have less to maintain.

I guess this discussion is going back into "when you hiring a dev team", as that would be decent reviewing of existing code.

Robin Shen commented 1 year ago

I see. This is goodness of open source, everyone can check the code to find vulnerabilities. Actually several security study team reported vulnerabilities of OneDev already and I got them fixed soon:

https://github.com/theonedev/onedev/security/advisories

Unknown commented 1 year ago

What about your fancy new EE which is being worked on :P

Also I am surprised so many people have checker for vulnerabilities, but that is different from checking for performance improvements!

Robin Shen commented 1 year ago

Source of EE plugins will also be publicly available.

Unknown commented 1 year ago

I only use onedev instance, not github, was not aware of 10k stars and hundreds of forks... what happened to dogfooding O.O

I guess onedev is a lot larger than I anticipated!!!

Unknown commented 1 year ago

Hope you got your lawyers ready for the onslaught of script kiddies who will redistribute the EE for free, and for the businesses which wont bother paying.

Also you would need a lawyer to help write up the licence for EE, they bill at a lot!

Robin Shen changed state to 'Closed' 1 year ago
Previous Value Current Value
Open
Closed
Robin Shen commented 1 year ago

Thanks for remind. I believe people will pay for what they feel valueable. Not only for features, but also for support. I am closing this now.

Unknown commented 1 year ago

Why not just keep it as a blanket distribution and do the "pay what you want" price tag, where you pay what you feel the product is worth, to help the devs when downloading the product, it sounds like what you are trying to accomplish with the EE but the issue is doing it with the current version too would help with higher uptake.

There is never anything wrong with asking... and you currently are not accepting donations... might be worth testing the waters and see what works :)

issue 1 of 1
Type
Question
Priority
Minor
Assignee
Issue Votes (0)
Watchers (3)
Reference
OD-1215
Please wait...
Page is in error, reload to recover