Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce SQL number of separate sql queries in situations they could be done all at once #104

Closed
cmyui opened this issue May 23, 2021 · 2 comments
Assignees
Labels
performance Improvements to resource usage without changing functionality

Comments

@cmyui
Copy link
Member

cmyui commented May 23, 2021

Basically stuff like this should be done with a single connection & query to sql, then the loop should just be in python to move the data around in memory.

@cmyui cmyui added the performance Improvements to resource usage without changing functionality label May 23, 2021
@cmyui cmyui self-assigned this May 23, 2021
@cmyui
Copy link
Member Author

cmyui commented May 23, 2021

I should also note that this is pretty uncommon in the codebase and most of these occurrences are from some of the oldest portions of the code. For example the link to the example I provided above is actually from gulag's 2nd ever commit, and my development practices have definitely improved since :P.

@cmyui
Copy link
Member Author

cmyui commented May 23, 2021

Finished the obvious ones, going to do some more things like probably pass a db cursor into domains.cho.login() and perhaps make them optional arguments in a few other functions/methods for special case optimizations.

@cmyui cmyui closed this as completed May 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Improvements to resource usage without changing functionality
Projects
None yet
Development

No branches or pull requests

1 participant