rabbibotton / clog

CLOG - The Common Lisp Omnificent GUI
Other
1.49k stars 102 forks source link

Avoiding using the same lock for generating all script ids #206

Closed shakatoday closed 1 year ago

shakatoday commented 1 year ago

Currently CLOG uses the same lock for generating all script ids. (if I understand it correctly) It will affect the performance for multi-user applications.

How about one lock per connection id? Or, maybe there's a better way.

rabbibotton commented 1 year ago
(proclaim '(type fixnum *new-id*)) (defglobal *new-id* 0)
(atomic-incf *new-id*)

That is ideal way on sbcl, there should be something similar for ecl

rabbibotton commented 1 year ago

https://shinmera.github.io/atomics/

rabbibotton commented 1 year ago

Implemented.

shakatoday commented 1 year ago

Thank you for your professional solution!