You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| GCI1 | Calling a Spring repository inside a loop or a stream | The use of Spring repository in a loop or a stream induces unnecessary calculations by the CPU and therefore superfluous energy consumption. || ✅ | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |/Users/daviddecarvalho/git_creedengo/creedengo-rules-specifications/src/main/rules/GCI1 |
28
-
| GCI2 | Multiple if-else statements | Using too many conditional if-else statements will impact performance since JVM will have to compare the conditions. Prefer using a switch statement instead of multiple if-else if possible, or refactor your code to reduce conditonnal statements on the same variable. Switch statement has a performance advantage over if – else. || ✅ | ✅ | 🚀 | ✅ | 🚀 | 🚀 | 🚫 |/Users/daviddecarvalho/git_creedengo/creedengo-rules-specifications/src/main/rules/GCI2 |
29
-
| GCI3 | Getting the size of the collection in the loop | When iterating over any collection, fetch the size of the collection in advance to avoid fetching it on each iteration, this saves CPU cycles, and therefore consumes less power. || ✅ | ✅ | 🚀 | 🚫 | 🚀 | 🚫 | 🚫 |/Users/daviddecarvalho/git_creedengo/creedengo-rules-specifications/src/main/rules/GCI3 |
30
-
| GCI4 | Use global variables | When using a global variable, the interpretation engine must check: 1) that it exists in the current scope, in the one above, etc. ; 2) the variable has a value; 3) ... To avoid all these checks, it is often possible to pass the useful variables as arguments of routines, making them local. This process saves computational time (CPU cycles). |[cnumr best practices (3rd edition) BP_050 (no longer exists in edition 4)](https://www.greenit.fr/2019/05/07/ecoconception-web-les-115-bonnes-pratiques-3eme-edition/)| 🚫 | ✅ | 🚀 | ✅ | 🚀 | 🚫 | 🚫 |/Users/daviddecarvalho/git_creedengo/creedengo-rules-specifications/src/main/rules/GCI4 |
31
-
| GCI5 | Usage of preparedStatement instead of Statement | SQL will only commit the query once, whereas if you used only one statement, it would commit the query every time and thus induce unnecessary calculations by the CPU and therefore superfluous energy consumption. || ✅ | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |/Users/daviddecarvalho/git_creedengo/creedengo-rules-specifications/src/main/rules/GCI5 |
27
+
| GCI1 | Calling a Spring repository inside a loop or a stream | The use of Spring repository in a loop or a stream induces unnecessary calculations by the CPU and therefore superfluous energy consumption. || ✅ | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |[documentation](https://github.com/green-code-initiative/creedengo-rules-specifications/tree/main/src/main/rules/GCI1)|
28
+
| GCI2 | Multiple if-else statements | Using too many conditional if-else statements will impact performance since JVM will have to compare the conditions. Prefer using a switch statement instead of multiple if-else if possible, or refactor your code to reduce conditonnal statements on the same variable. Switch statement has a performance advantage over if – else. || ✅ | ✅ | 🚀 | ✅ | 🚀 | 🚀 | 🚫 |[documentation](https://github.com/green-code-initiative/creedengo-rules-specifications/tree/main/src/main/rules/GCI2)|
29
+
| GCI3 | Getting the size of the collection in the loop | When iterating over any collection, fetch the size of the collection in advance to avoid fetching it on each iteration, this saves CPU cycles, and therefore consumes less power. || ✅ | ✅ | 🚀 | 🚫 | 🚀 | 🚫 | 🚫 |[documentation](https://github.com/green-code-initiative/creedengo-rules-specifications/tree/main/src/main/rules/GCI3)|
30
+
| GCI4 | Use global variables | When using a global variable, the interpretation engine must check: 1) that it exists in the current scope, in the one above, etc. ; 2) the variable has a value; 3) ... To avoid all these checks, it is often possible to pass the useful variables as arguments of routines, making them local. This process saves computational time (CPU cycles). |[cnumr best practices (3rd edition) BP_050 (no longer exists in edition 4)](https://www.greenit.fr/2019/05/07/ecoconception-web-les-115-bonnes-pratiques-3eme-edition/)| 🚫 | ✅ | 🚀 | ✅ | 🚀 | 🚫 | 🚫 |[documentation](https://github.com/green-code-initiative/creedengo-rules-specifications/tree/main/src/main/rules/GCI4)|
31
+
| GCI5 | Usage of preparedStatement instead of Statement | SQL will only commit the query once, whereas if you used only one statement, it would commit the query every time and thus induce unnecessary calculations by the CPU and therefore superfluous energy consumption. || ✅ | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |[documentation](https://github.com/green-code-initiative/creedengo-rules-specifications/tree/main/src/main/rules/GCI5)|
32
32
| GCI7 | Rewrite native getter/setters | Overloading them lengthens the compilation and execution times of these methods, which are usually much better optimized by the language than by the developer. |[cnumr best practices (3rd edition) BP_062 (no longer exists in edition 4)](https://www.greenit.fr/2019/05/07/ecoconception-web-les-115-bonnes-pratiques-3eme-edition/)| 🚫 | 🚫 | 🚀 | ✅ | 🚀 | 🚫 | 🚫 |
33
33
| GCI9 | Importing everything from library should be avoided | ESLint key : @ecocode/no-import-all-from-library /// type : Common || ❓ | ❓ | ✅ | ❓ | ❓ | ❓ | 🚫 |
34
34
| GCI10 | Use unoptimized vector images | Less heavy SVG images using less bandwidth |[cnumr best practices (3rd edition) BP_036](https://github.com/cnumr/best-practices/blob/main/chapters/BP_036_fr.md)| 🚧 | 🚀 | 🚀 | ✅ | 🚀 | 🚫 | ❓ |
0 commit comments