[Enhancement] dgl.batch is slow due to FFI
Open
bug:confirmed
topic: system performance
- Dominant language
- Python
- Stars
- 14.3k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
According to our test, `dgl.batch` is a bottleneck in graph classification. One main reason is it frequently call `number_of_edges` and `number_of_nodes` which further call underlying C++ function via `FFI`. Unfortunately, `FFI` has taken up 97% time of these 2 functions. To tackle the problem, we thought out 2 ways:
1. Replace FFI with other method.
2. Duplicate attributes to python level object.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.