kraison / vivace-graph-v3

VivaceGraph version 3. Open source Common Lisp graph database & Prolog implementation. Supersedes http://github.com/kraison/vivace-graph-v2.
Other
154 stars 29 forks source link

Add support to LispWorks #29

Closed jingtaozf closed 3 years ago

jingtaozf commented 4 years ago

Things done:

Things todo:

kraison commented 4 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.

jingtaozf commented 4 years ago

It has been a while since I used Lispworks, but I think you need the :single-thread nil argument to make-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

jingtaozf commented 4 years ago

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).

kraison commented 4 years ago

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.

jingtaozf commented 4 years ago

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.

jingtaozf commented 4 years ago

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).

kraison commented 3 years ago

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.

jingtaozf commented 3 years ago

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 .