Skip to content

Commit

Permalink
[ISSUE 140] rule EC3 : no implementation for python
Browse files Browse the repository at this point in the history
  • Loading branch information
dedece35 committed Sep 22, 2023
1 parent 5783040 commit 1bd5870
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RULES.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Some are applicable for different technologies.
| EC72 | Perform an SQL query inside a loop | Servers are optimized to process multiple selections, insertions, or changes in a single query or transaction. consume CPU cycles, RAM, and bandwidth unnecessarily. | [cnumr best practices (3rd edition) BP_072](https://github.com/cnumr/best-practices/blob/main/chapters/BP_072_fr.md) ||| 🚀 || 🚀 |
| EC74 | Write SELECT * FROM | The database server must resolve the fields based on the schema. If you are familiar with the diagram, it is strongly recommended to name the fields. | [cnumr best practices (3rd edition) BP_074 (no longer exists in edition 4)](https://www.greenit.fr/2019/05/07/ecoconception-web-les-115-bonnes-pratiques-3eme-edition/) ||| 🚀 || 🚀 |
| EC1 | Calling a Spring repository inside a loop | The use of Spring repository in a loop induces unnecessary calculations by the CPU and therefore superfluous energy consumption. | || 🚫 | 🚫 | 🚫 | 🚫 |
| EC3 | 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. | ||| 🚀 | 🚀 | 🚀 |
| EC3 | 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. | ||| 🚀 | 🚫 | 🚀 |
| EC2 | Multiple if-else statement | 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. | ||| 🚀 | 🚧 | 🚀 |
| EC76 | Usage of static collections | Avoid usage of static collections. If you want to use static collections make them final and create for example a singleton if needed containing the collections. The static fields are more complicated for the Garbage Collector to manage and can lead to memory leaks. | || 🚫 | 🚫 | 🚫 | 🚫 |
| EC77 | Usage Pattern.compile() in a non-static context | Avoid using Pattern.compile() in a non-static context. This operation requires a non negligible amount of computational power, Using a single match saves CPU cycles and RAM consumption. | || 🚫 | 🚫 | 🚫 | 🚫 |
Expand Down

0 comments on commit 1bd5870

Please sign in to comment.