Code Monkey home page Code Monkey logo

Comments (10)

huangdijia avatar huangdijia commented on September 22, 2024

我看源码里两处require都没做缓存机制,是否考虑优化,考虑常驻进程框架的使用场景。

from pinyin.

overtrue avatar overtrue commented on September 22, 2024

@huangdijia 常驻进程会 require 多次吗?

from pinyin.

huangdijia avatar huangdijia commented on September 22, 2024

多次调用不会多次require吗?

from pinyin.

overtrue avatar overtrue commented on September 22, 2024

@huangdijia 噢。你说的是数据的那两次 require,那是因为为了控制内存占用,所以把内存占用控制在单个文件所占用的大小,如果将结果缓存的话,那数据就不需要分片了。

from pinyin.

overtrue avatar overtrue commented on September 22, 2024

@huangdijia 这是经过多次测试分片大小,目前的大小是内存和转换速度的最适合的大小(在我的电脑上测试是这样)

from pinyin.

huangdijia avatar huangdijia commented on September 22, 2024

@huangdijia 这是经过多次测试分片大小,目前的大小是内存和转换速度的最适合的大小(在我的电脑上测试是这样)

你的意思是全部放内存里,转换速度还没有分片每次都从文件加载快吗?(其实我也不是很懂)

from pinyin.

overtrue avatar overtrue commented on September 22, 2024

from pinyin.

yisibl avatar yisibl commented on September 22, 2024

多音字的 API polyphonic 是不是用 heteronym 合适一些?

https://www.sagebookshk.com/activities-to-practice-heteronyms/
https://en.wikipedia.org/wiki/Heteronym_(linguistics)

from pinyin.

overtrue avatar overtrue commented on September 22, 2024

@yisibl 也可以,因为当时我的确是找了好多种渠道,包括参考了一些开源库的命名。我先把它都加上

from pinyin.

yisibl avatar yisibl commented on September 22, 2024

Nice!

from pinyin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.