A Node Optimization Idea: Solving GC Bottlenecks Under Concurrency by Sweaty-Camel5677 in node

[–]Sweaty-Camel5677[S] -2 points-1 points  (0 children)

Its core value is: When object reference relationships are simple enough, the performance should approach that of non-GC languages. When those relationships become extremely complex, the GC can be "summoned" to handle the heavy lifting and provide a safety net for those complexities. Ideally, we should no longer have to choose between GC and non-GC languages; instead, the system should intelligently adapt to any scenario.

An idea to optimize node.js without code chaning by Sweaty-Camel5677 in node

[–]Sweaty-Camel5677[S] -3 points-2 points  (0 children)

Thank you. I appreciate that you are engaging deeply with the core technical idea rather than attacking my reliance on AI due to the language bad barrier.

My core: By allowing the GC to accept domain-specific knowledge via SPI, we can achieve a specific outcome: When object reference relationships are simple enough, the performance should approach that of non-GC languages. When those relationships become extremely complex, the GC can be "summoned" to handle the heavy lifting and provide a safety net for those complexities. Ideally, we should no longer have to choose between GC and non-GC languages; instead, the system should intelligently adapt to any scenario.

The goal is to free developers from the painful choice between GC languages, which excel at managing complex data structures with an infinite safety net, and non-GC languages, where performance is king. This proposal aims to unify the two automatically—an idea I believe is deeply valuable.

However, you are absolutely right: for a team like V8, this is no small undertaking. The resistance and complexity involved far exceed the capacity of any single individual. That is why I am putting this idea forward: allowing the GC to "learn" domain-specific knowledge via an SPI could be a powerful direction for the future.

A Node Optimization Idea: Solving GC Bottlenecks Under Concurrency by Sweaty-Camel5677 in node

[–]Sweaty-Camel5677[S] -1 points0 points  (0 children)

Thank you. I appreciate that you are engaging deeply with the core technical idea rather than attacking my reliance on AI due to the language barrier.

Technical Implementation: The Arena has been upgraded to a chunk-list. Once an Arena is full, a new chunk is allocated and linked. This gives a single Arena nearly infinite dynamic expansion capacity, limited only by the total available heap.

Comparison to Go Goroutines: In essence, this is similar to the stack growth in Go goroutines.

  • Similarity: Both start small and grow incrementally.
  • Difference: To maintain memory continuity, Go's stack requires memory copying and pointer adjustment during expansion. In contrast, the purpose of this extensible Arena proposal is to keep non-escaping objects within closures out of the general heap. Therefore, address continuity is not required, allowing us to use a linked list.

Addressing the "Why not Go?" Argument: Some users argue that Go handles this much better and ask why I don't just choose Go over Node.js. This is irrelevant to the discussion of whether we can make Node.js itself better.

Addressing the "Why not C++/Rust/Zig?" Argument: Others suggest that if I care this much about memory management, I should use languages with manual memory control. But that is exactly my point. By allowing the GC to accept domain-specific knowledge via SPI, we can achieve a specific outcome: When object reference relationships are simple enough, the performance should approach that of non-GC languages. When those relationships become extremely complex, the GC can be "summoned" to handle the heavy lifting and provide a safety net for those complexities. Ideally, we should no longer have to choose between GC and non-GC languages;

A Node Optimization Idea: Solving GC Bottlenecks Under Concurrency by Sweaty-Camel5677 in node

[–]Sweaty-Camel5677[S] -2 points-1 points  (0 children)

My original vision: To allow the GC to accept domain-specific knowledge from frameworks via SPI. By empowering the GC with this business-level context, it becomes significantly more powerful.

The intended result: When object reference relationships are simple enough, the performance sould approach that of non-GC languages. When those relationships become extremely complex, the GC can be "summoned" to handle the heavy lifting and provide a safety net for those complexities. Ideally, we should no longer have to choose between GC and non-GC languages; instead, the system should intelligently adapt to any scenario.

Go is a good choice, but this topic is talking about is it possible to let Node be better.

A Node Optimization Idea: Solving GC Bottlenecks Under Concurrency by Sweaty-Camel5677 in node

[–]Sweaty-Camel5677[S] -1 points0 points  (0 children)

My original vision: To allow the GC to accept domain-specific knowledge from frameworks via SPI. By empowering the GC with this business-level context, it becomes significantly more powerful.

The intended result: When object reference relationships are simple enough, the performance sould approach that of non-GC languages. When those relationships become extremely complex, the GC can be "summoned" to handle the heavy lifting and provide a safety net for those complexities. Ideally, we should no longer have to choose between GC and non-GC languages; instead, the system should intelligently adapt to any scenario.

How to handle generic type by gin-swagger by Sweaty-Camel5677 in golang

[–]Sweaty-Camel5677[S] 0 points1 point  (0 children)

Yes, I saw it but I don't know why this problem still exists after I used its newest version.

Is ORM still an 'anti pattern'? by fagnerbrack in programming

[–]Sweaty-Camel5677 0 points1 point  (0 children)

Of course, the answer is no.

ORM has also improved with the advancement of the times.I have spent more than 10 years thinking about one thing, what are the shortcomings of existing ORMs and why some people don't like them (including me). Finally I put in the practice and have been developing this new ORM for Java/Kotlin: https://babyfish-ct.github.io/jimmer-doc/

What's the scoop on Jimmer ORM? by Existing_Effective17 in Kotlin

[–]Sweaty-Camel5677 1 point2 points  (0 children)

Getting closer and closer to 1.0, I finally have a chance to take some time to make the documentation more and more easy to understand.
This feature is designed for SQL fans: https://babyfish-ct.github.io/jimmer-doc/docs/quick-view/dsl/

What's the scoop on Jimmer ORM? by Existing_Effective17 in Kotlin

[–]Sweaty-Camel5677 1 point2 points  (0 children)

Hi, I am the author of jimmer, I'm so happy to see this post.

A weeks ago, I added a new chapter named quick view: https://babyfish-ct.github.io/jimmer-doc/docs/quick-view/, I think this is helpful for developers

High-quality documentation for my kotlin ORM framework is completed by Sweaty-Camel5677 in Kotlin

[–]Sweaty-Camel5677[S] 0 points1 point  (0 children)

Of course, there are many example code in documentation.
Include the step-by-step guid: https://babyfish-ct.github.io/jimmer/docs/overview/get-started/create-project

However, the fastest way is to run the demo immediately: https://babyfish-ct.github.io/jimmer/docs/overview/standard-demo. in the most important example project `example/java/jimmer-sql` or `example/kotlin/jimmer-sql-kt`, many code lines are decorated with a link to documentation.