Jason
Jason
lthread is incompatible with windows systems. port work maybe: 1. context switch 2. iocp
设想优化这个的目的不是加快运行速度,而是节约内存。因为我想把它放到一个云主机去运行,内存有限。很多个进程都需要用到分词,都需要加载这个大的字典,若能通过共享内存的方式来使用这个字典就最好了。 当然尝试过几天,发现没有我想象得那么简单。大概如这哥们说的, This is a bit similar to constructing an on-disk DAWG, which I did a while back. What made that so very sweet was that it could be loaded...
最近找到一些Double Array Trie 实现的trie树,感觉很节约内存,并且还很快。但是我只是用了没有深入测试与研究。 On Sun, Mar 16, 2014 at 2:59 PM, soe-coe [email protected] wrote: > 是否可以对词典大小进行估量,进而建立trienode内存池,以减少每次调用new的开销? > > — > Reply to this email directly or view it on...
谢谢,作者真是有心啊。这样的项目100个顶! @aszxqw 我用的是这个库: http://www.tkl.iis.u-tokyo.ac.jp/~ynaga/cedar/ 这里是我作的一点修改:https://github.com/jannson/wordmaker/blob/master/src/cedar.h
OK, we will support in the feature.
Now we are working for this issue.
I find that buffer from synt.Pool can be gc when the sync.Pool hold the only reference. https://golang.org/src/sync/pool.go line 17 But you should put the buffer to bufferPool event it can...
I can try a demo for this case , but I cannot support it directly in Grab, for the Grab implement is quit complex.
很早就 stat 了作者的项目,一直没机会用。今天看到这个问题就尝试定位了下问题,不能用的原因: 1. https://github.com/fhmq/hmq/blob/master/broker/broker.go#L276 这个位置没较验通过,少了版本号与版本 ID 2. https://github.com/fhmq/hmq/blob/3cf90d5231d2a025fb68fd639551d4bfdb22fe11/broker/client.go#L341 其次是这里,没有处理 REMOTE 的情况,导致 broadcast 过来的消息没被处理。 想尝试修复下,发现还有其它问题,所以无法提交 PR
修复并测试成功,代码已经提交,请作者确认: https://github.com/fhmq/hmq/pull/86