giacomelli / GeneticSharp

GeneticSharp is a fast, extensible, multi-platform and multithreading C# Genetic Algorithm library that simplifies the development of applications using Genetic Algorithms (GAs).
MIT License
1.27k stars 332 forks source link

Performance Tweaks #55 #56

Closed codingdna2 closed 5 years ago

codingdna2 commented 5 years ago

Performance Tweaks (PLINQ/TPL) to Genetic Algorithm #55

codingdna2 commented 5 years ago

I'm pushing the first part, just wait to review it again, I still need to fix documentation and tests

codingdna2 commented 5 years ago

How can I force a SonarCloud build? I would like to check the results of my modifications...

giacomelli commented 5 years ago

How can I force a SonarCloud build? I would like to check the results of my modifications...

Sonar can be run from tools/runSonar.sh (or .cmd), but it's need a login from https://sonarcloud.io, in this case is my account. You can create a https://sonarcloud.io account for you and change runSonar.sh|cmd to your account details.

Anyway, I ran it again from your latest code: https://sonarcloud.io/project/issues?branch=feature%2Fperformance-tweaks&id=GeneticSharp&resolved=false

codingdna2 commented 5 years ago

I'm pushing the second part, still wait to review it, I still need to fix documentation and tests.

Open Questions:

  1. Please review comment in DefaultOperatorsStrategy.cs

  2. I guess I should make the OperatorsStrategy part of the ISampleController in the GeneticSharp.Runner.ConsoleApp. Right?

  3. Where is the wiki documentation? Is not included in the project?

  4. Are you OK to use Ghostwriter as sample for Tpl classes or you prefer to leave the samples untouched?

PS: Can you run the sonarcloud build once again?

giacomelli commented 5 years ago

I'm pushing the second part, still wait to review it, I still need to fix documentation and tests.

Open Questions:

  1. Please review comment in DefaultOperatorsStrategy.cs
  2. I guess I should make the OperatorsStrategy part of the ISampleController in the GeneticSharp.Runner.ConsoleApp. Right?
  3. Where is the wiki documentation? Is not included in the project?
  4. Are you OK to use Ghostwriter as sample for Tpl classes or you prefer to leave the samples untouched?

PS: Can you run the sonarcloud build once again?

1) Reviewed.

2) Maybe there are no need, because any sample can change it on ConfigGA method.

3) The wiki is a separated repo (https://github.com/giacomelli/GeneticSharp.wiki.git), but to keep things simple, you can change it directly on https://github.com/giacomelli/GeneticSharp/wiki.

4) It's better to keep the already existing samples untouched, but you can create a new one if you have any idea.

I ran SonarCloud again.

codingdna2 commented 5 years ago

I've completed the required changes. You can now proceed to review the PR. Thanks, D.

codingdna2 commented 5 years ago

I think I've completed. Can you run the check on sonarcloud one more time? Thanks

codingdna2 commented 5 years ago

My bad, it's now fixed.

giacomelli commented 5 years ago

Thanks for the PR. I will merge it to develop branch. 👍

I need to finish some feature branches from my side, then I'll publish a new release and a nuget package with your contributions.