Skip to content

Conversation

@jonathanslenders
Copy link
Member

…fewer and better regexes.

@laixintao
Copy link

Hi @jonathanslenders thanks for the work. The compiling time saved a lot.

I read the code and think it's good, but there is a problem with completion on space.

eg:
On this branch, when I type SPACE the completion didn't show up:
Screen Shot 2020-01-08 at 10 34 43 AM

Screen Shot 2020-01-08 at 10 34 46 AM

But on prompt_toolkit(2.0 which is iredis current use) it works fine:

Screen Shot 2020-01-08 at 10 39 13 AM

@jonathanslenders
Copy link
Member Author

@laixintao : Thank you for the feedback! I really appreciate you trying it out.
This bug needs to be fixed before merging it. I'll look into that.

@jonathanslenders
Copy link
Member Author

@laixintao: can you check again against this branch?
I did a few bug fixes, and maybe the performance is a bit better even.

I think I got it right, and the above bug is solved.
Still need to clean up the code, before merging.

@laixintao
Copy link

@jonathanslenders Thanks!

I tested with this branch, the cost time down to `.7 seconds, and all the compilations work fine as far as I tested.

From my log, the _re_prefix_patterns that need to compile down to 496 only (previous ~8000), that's amazing! Excellent work!

 INFO Compiled _re_prefix_pattern: 496 DEBUG [compile] Compile finished! Cost: 1.7887732982635498 
@jonathanslenders jonathanslenders force-pushed the improved-regular-languages-compiler branch from 00c7868 to 57f9a52 Compare January 15, 2020 18:00
@jonathanslenders jonathanslenders merged commit afc3e00 into master Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants