GithubHelp home page GithubHelp logo

内存问题 about pinyin HOT 5 CLOSED

hotoo avatar hotoo commented on June 19, 2024
内存问题

from pinyin.

Comments (5)

hotoo avatar hotoo commented on June 19, 2024

#19

from pinyin.

struCoder avatar struCoder commented on June 19, 2024

okay : )

from pinyin.

hotoo avatar hotoo commented on June 19, 2024

有一个优化点,词组的拼音库,可以只保留『有多音字的词组』,没有多音字的词组以普通的拼音转换即可。
不过工作量会比较大,希望大家能帮助找出有多音字的词组。 :)

from pinyin.

struCoder avatar struCoder commented on June 19, 2024

我昨天简单测试了一下,在加载100000次后,内存涨到130MB,这里仅仅是重复加载。
测试代码:

(function() {
  var http = require('http')
  http.createServer(function(req, res){

  }).listen(3000, function(){
    console.log('server run')
  })
  var temp;
  for(var i = 0; i < 100000; i++) {
    temp = require('pinyin');
  }
}());

from pinyin.

hotoo avatar hotoo commented on June 19, 2024

干嘛要重复加载?
一次加载,建议重复运行。

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.