Skip to content

Improve _build_query time#16

Open
raman325 wants to merge 1 commit into
OnFreund:masterfrom
raman325:patch-2
Open

Improve _build_query time#16
raman325 wants to merge 1 commit into
OnFreund:masterfrom
raman325:patch-2

Conversation

@raman325

@raman325 raman325 commented Apr 2, 2022

Copy link
Copy Markdown
Contributor

The process of updating the dictionary over and over with a new dictionary will be slower than using dict comprehension. Not sure how much of a speed up you'll gain but it's a small change that at worst barely makes a difference but at best makes a slight difference.

Also is the intent to make sure val is not None? I assumed it is because this will filter out when val=0 or False as well, but if that's not correct I can update this

@OnFreund

OnFreund commented Apr 9, 2023

Copy link
Copy Markdown
Owner

Thanks @raman325. Did you test this?

@raman325

raman325 commented Apr 9, 2023

Copy link
Copy Markdown
Contributor Author

yes but I wasn't clear, was the intention to do a falsey check? I switched to using an explicit none check and wasn't sure if that would break anything

@OnFreund

Copy link
Copy Markdown
Owner

I'm not sure, since this part was written by @cgtobi and I'm not sure if he's still active.
Have you tried browsing all categories?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants