Closed xguse closed 4 years ago
There is actually a bug in the current 4.x that actually a PR is now open for to fix (Version 4.2.0), where an 5MB data ingest takes 2 seconds on the upcoming 4.2 took over 10 minutes.
Box 3.x is designed for that use case more, as it only converts sub boxes on lookup. (This library only operates by being able to change the object types, if you check out alternatives like addict that don't you will see they are limited to not being able to traverse lists IIRC ).
I am awaiting some feedback and can hopefully release 4.2 tomorrow
thanks for the update and info about addict. I hadn't yet heard of that one. I will check it out.
No problem, they are trying to solve the problem a little differently and have a good solution. I was also wrong, looks like theirs does do list traversal as well!
Just as a heads up, Box 4.2.0 is now out, so should solve the speed problems, but will of course still change the dict
s into the Box objects, which addict
will do that as well after looking again.
Is there a reason that there is not an option to turn this behavior off?
There are times when I just want the Dict that I give Box to be dot accessible. By ALWAYS converting ANYTHING that looks like it could be a list or dict into a bloated Box without my permission, I just turned a 0.0000001 sec operation into a .... well it hasnt finished yet kind of operation in my Jupyter NB.
It turns out that one of the keys in that original dict contained the human genome's gene-set as a key-value pair.