I tried with 2.3.2, started with a fresh db that had 10 nodes in it. I then ran the first command to import 5 million nodes from CSV. This took 12 minutes and when it finished it was using 1.6GB memory. Size on disk was 2.5GB.
I ran the second command and it created the 5 million edges in 8 minutes, after which it was using 1.8GB memory and size on disk was 3.32GB. A few minutes later memory usage went down to 1.3GB.
Next I ran the first command again on another CSV file which contained 5 million events too. It took 15 minutes to create the nodes, was using 2.2GB memory and size on disk was 5.9GB.
When I ran the second command on this file it completed in 8 minutes and was still using 2.2GB memory. Size on disk was at 6.8GB.
After that I ran another command similar to the second one, which creates another edge for each node and it completed in 8 minutes and memory was at 2.3GB.
So up to now it does seem to be a bit better in that it doesn't stall.
When I prefix the second command with EXPLAIN this is what I'm getting:
Compiler CYPHER 2.3
Planner RULE
Runtime INTERPRETED
+--------------+-----------------------+-------------------------------+
| Operator | Identifiers | Other |
+--------------+-----------------------+-------------------------------+
| +EmptyResult | | |
| | +-----------------------+-------------------------------+
| +Merge(Into) | anon[167], e, f, line | (e)-[:FOR]->(f) |
| | +-----------------------+-------------------------------+
| +SchemaIndex | e, f, line | line.eventID; :EVENT(eventID) |
| | +-----------------------+-------------------------------+
| +SchemaIndex | f, line |
line.name; :Feature(name) |
| | +-----------------------+-------------------------------+
| +LoadCSV | line | |
+--------------+-----------------------+-------------------------------+
Total database accesses: ?