Code Monkey home page Code Monkey logo

Comments (2)

back2dos avatar back2dos commented on June 1, 2024 1

With #40 it seems fine:

2020-08-21 17:06:08: Heap: 2.88 / 5.5 MB
2020-08-21 17:06:10: Heap: 3.38 / 5.75 MB
2020-08-21 17:06:12: Heap: 3.41 / 5.75 MB
2020-08-21 17:06:14: Heap: 3.44 / 5.75 MB
2020-08-21 17:06:16: Heap: 2.43 / 4.5 MB
2020-08-21 17:06:18: Heap: 2.46 / 4.5 MB
2020-08-21 17:06:20: Heap: 2.49 / 4.5 MB
2020-08-21 17:06:22: Heap: 2.51 / 4.5 MB
2020-08-21 17:06:24: Heap: 2.54 / 4.5 MB

from tink_state.

kevinresol avatar kevinresol commented on June 1, 2024

I guess the real cause is ObservableMap#get:

class Main {
	static function main() {
		final map = new tink.state.ObservableMap<Int, String>([]);
		
		new haxe.Timer(20).run = () -> {
			for(i in 0...100) map.get(i);
		}
		
		// monitor memory
		new haxe.Timer(2000).run = function() {
			var memory = js.Node.process.memoryUsage();
			inline function format(v:Float)
				return Std.int(v / 1024 / 1024 * 100) / 100;

			Sys.println('${Date.now().toString()}: Heap: ${format(memory.heapUsed)} / ${format(memory.heapTotal)} MB');
		};
		
		
	}
}

Leaked 200MB in 10s

2020-08-13 17:11:46: Heap: 43.81 / 65.6 MB
2020-08-13 17:11:48: Heap: 87.18 / 116.08 MB
2020-08-13 17:11:50: Heap: 130.75 / 150.85 MB
2020-08-13 17:11:52: Heap: 174.42 / 201.6 MB
2020-08-13 17:11:54: Heap: 220.52 / 240.51 MB
2020-08-13 17:11:56: Heap: 261.82 / 285.51 MB

from tink_state.

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.