Closed jingtaozf closed 3 years ago
Thanks for putting this together! How is the performance using Lispworks? I found CCL to be 10x slower than SBCL; I hope Lispworks fares better.
It has been a while since I used Lispworks, but I think you need the
:single-thread nil
argument tomake-hash-table
for the sake of thread safety.
The default value of single-thread is nil so it should be fine: http://www.lispworks.com/documentation/lw60/LW/html/lw-608.htm
You will need to replace the hash table weakness with some other garbage collection method, otherwise these caches will cause high memory usage.
I have to remove weakness because it is too slow in LispWorks. After removing it, I think the speed for make-graph
is fast enough for me(about 7s in my machine).
Regarding hash table weakness: this was a quick and clean way to implement various caches that guarantees that objects loaded into memory from disk will eventually be garbage collected by Lisp. Without using weakness in these hash tables, they will hold on to objects forever, and you will definitely have memory issues. There are other methods for building a cache that you could consider, such as an LRU. But some sort of managed cache will definitely need to take the place of weak hash tables if they are not viable under Lispworks.
After enabling the weakness in LispWorks it becomes too slow to make or open a graph database, I think current migration can be treated as a development test environment instead of product one.
Hi Kevin, I have recovered the weak hash tables and asked for a LispWorks patch to improve the performance.
The make-graph takes about 40 seconds now in my computer(which SBCL takes about 7 seconds and LispWorks without a patch takes about 120 seconds).
Hey, how is your port going? I went offline for the winter, but am back now and happy to merge your changes if you feel they are ready.
Yes, I think it is ready for merge. Thanks.
Kevin Raison notifications@github.com于2021年2月12日 周五上午4:09写道:
Hey, how is your port going? I went offline for the winter, but am back now and happy to merge your changes if you feel they are ready.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kraison/vivace-graph-v3/pull/29#issuecomment-777757648, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABAMYQUFIQJVNUGDT2DSO3S6Q2PVANCNFSM4S7ASPQA .
Things done:
example.lisp
make-graph
.Things todo:
node-class.lisp
should removeeval-when
form.