Skip to content

Conversation

@martinpopel
Copy link
Contributor

No description provided.

When using Udapi via udapy, gc is disabled by default. But even when gc is not globally disabled, we can get a big speedup: - temporarily disabling garbage collection during CoNLL-U (or another reader) loading - run gc.collect() after the loading is done (all-generation GC after loading makes future node.create_child() calls faster)
- `for i in range(1,10)` is slower than `for i in [1,2,3,4,5,6,7,8,9]`. - We need just some of the columns to be converted.
at the cost of 17% more memory and an additional method `read_trees()` as an alternative to `read_tree()` (which needs to be implemented in all readers anyway)
@martinpopel martinpopel merged commit 3e44b73 into master Feb 20, 2021
@martinpopel martinpopel deleted the speedup branch February 20, 2021 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants