;tldr Tasty Mantou’s dictionary is faster and has more features than before.

Tasty Mantou’s dictionary just got an upgrade.

What is 疯狂凤凰

疯狂凤凰 (Say that 10 times fast) is the 6th version of my Dictionary API service. It’s replacing 恶狗, the 5th iteration of my Dictionary API service.

At the time, 恶狗 was the most impressive Dictionary API I had ever created. It allowed the usage of multiple dictionaries and let me create simple plugins that improved results (e.g. a number plugin that helps you look up the definition for any number).

A few months back, I started taking a close look at Tasty Mantou’s performance. One of the big takeaways: Tasty Mantou could be pretty slow. Originally, some pinyin searches, like ‘ji’, took over 15 seconds. Crazy, right?

In March, I spent a weekend on speed improvements and made 恶狗 1x - 8x faster. But that still meant pinyin searches would still take 1 - 2 seconds. Much better, but not good enough.

As I started thinking about how to improve things, I realized I’d need a better, simpler architecture for the Dictionary service.

That service became 疯狂凤凰, the last dictionary service I plan on creating. It’s faster, better tested, and easier to improve.

Performance Comparison

I decided to put 疯狂凤凰 to the test.

Search Term 恶狗 Response Time (ms)疯狂凤凰 Response Time (ms)

Chinese based searches are 18.1x - 59.6x faster. Pinyin based searches are 20.5x - 48.5x faster. The slowest searches for 疯狂凤凰 are faster than the fastest searches for 恶狗!

This speed increase has had a significant impact on throughput, too. With 恶狗, a typical deployment could handle ~ 8 users per second. 疯狂凤凰 can handle ~ 50 users per second.

Some Notes about Response Time:

  1. Chinese words vary on how complex the definition is. Words with definitions or more example sentences take the API longer.
  2. Pinyin searches always take longer than Chinese searches because they use two indexes, one for pinyin and then one for Chinese.

What can you look forward to?

Things will be faster. That’s good for everyone. The extra speed will allow Tasty Mantou to expand its dictionary services beyond this website. (One area I’m currently looking at: dictionary chat-bots.)

In the coming months, I’ll be adding another major feature to the dictionary based on some secret features of 疯狂凤凰.