carmen-ruby/carmen

Very slow rake and server execution times

G0dwin opened this issue · 3 comments

Cross posting this from the carmen-rails issues since the problem turns out to be with carmen itself: carmen-ruby/carmen-rails#24.

The issue is actually with unicode_utils but this gem hasn't been updated in nearly two years and only one minor method is actually used from the gem.

I believe that the issue may only be effecting Windows clients.

I believe that we are seeing this issue as well and we may be able to fix it by removing the unicode_utils dependence. We can use the Unicode support from the active_support gem and replace the UnicodeUtils.casefold call here

https://github.com/jim/carmen/blob/6d9f2f834deaf8f5b4502e71aaf40d8f4f01e8fa/lib/carmen/querying.rb#L35-L40

with something like this

name.mb_chars.downcase.normalize  === region.name.mb_chars.downcase.normalize 

I just wanted to follow up, that I was successful in speeding up carmen on windows by replacing unicode_utils with activesupport.

The pull request is here: #158

jim commented

I've just merged in #158. Thanks, eikes.

G0dwin, please give master a try- it should address this issue.