Giter Site home page Giter Site logo

Comments (13)

objeck avatar objeck commented on June 12, 2024

Thanks debugging and profiling.

Initial observations:

  • Memory usage remains constant even when garbage collection is relaxed
  • Most of the time is spent parsing the JSON with low CPU usage
  • Considering parallelism, i.e., workers when parsing JSON arrays

from objeck-lang.

objeck avatar objeck commented on June 12, 2024

The primary issue was memory management thresholds. The VM was tuned to run on low-memory hosts (i.e., RPI4). The initial memory size for programs outside of RPI4 was changed from 4M to 1G. I am looking into setting available VM memory to the 16th of the system memory. For now, things should be faster.

from objeck-lang.

 avatar commented on June 12, 2024

The primary issue was memory management thresholds. The VM was tuned to run on low-memory hosts (i.e., RPI4). The initial memory size for programs outside of RPI4 was changed from 4M to 1G. I am looking into setting available VM memory to the 16th of the system memory. For now, things should be faster.

https://www.baeldung.com/jvm-parameters

from objeck-lang.

objeck avatar objeck commented on June 12, 2024

The primary issue was memory management thresholds. The VM was tuned to run on low-memory hosts (i.e., RPI4). The initial memory size for programs outside of RPI4 was changed from 4M to 1G. I am looking into setting available VM memory to the 16th of the system memory. For now, things should be faster.

https://www.baeldung.com/jvm-parameters

Yep, I believe the VM has an .ini config file as well. I have tried to avoid VM parameters but will now look into this further.

from objeck-lang.

objeck avatar objeck commented on June 12, 2024

The primary issue was memory management thresholds. The VM was tuned to run on low-memory hosts (i.e., RPI4). The initial memory size for programs outside of RPI4 was changed from 4M to 1G. I am looking into setting available VM memory to the 16th of the system memory. For now, things should be faster.

Added prepended command line parameter --GC_THRESHOLD= for example 100k, 4m and 1g. The new runtime host memory check is the default.

from objeck-lang.

 avatar commented on June 12, 2024

I believe the VM has an .ini config file as well.

How that file look like? What about a sample .ini config file?

from objeck-lang.

objeck avatar objeck commented on June 12, 2024

I believe the VM has an .ini config file as well.

How that file look like? What about a sample .ini config file?

Nevermind, it was there. I will add it to the guide tomorrow. The file is config.prop however it only sets system properties.

from objeck-lang.

 avatar commented on June 12, 2024

The file is config.prop however it only sets system properties.

It's in lib\native\misc directory. Seems to be useless to me.

from objeck-lang.

 avatar commented on June 12, 2024

For now, things should be faster.

Was this issue really fixed or not? You have the JSON file, you could test.

from objeck-lang.

objeck avatar objeck commented on June 12, 2024

@tqo50396 I tested against the JSON file you provided. I then added auto-tuning parameters before adding support for manual configuration. All are based on the sample JSON file you gave me.

from objeck-lang.

 avatar commented on June 12, 2024

@tqo50396 I tested against the JSON file you provided. I then added auto-tuning parameters before adding support for manual configuration. All are based on the sample JSON file you gave me.

But what I want to know is simply if you fixed the issue or not. If you believed that you fixed it, you could close this issue. I can't test since I no longer use Objeck (nor do I want to fire up MSYS2 to compile Objeck from source).

from objeck-lang.

objeck avatar objeck commented on June 12, 2024

from objeck-lang.

 avatar commented on June 12, 2024

Yes, it is fixed. I will close the issue.

The Objeck VM eats more RAM but the performance is still terrible. I'm very disappointed.

Download Adept here: https://github.com/AdeptLanguage/Adept/releases/tag/Nightly

Compile the code with adept test.adept:

pragma compiler_version '2.8'

import basics
import JSON

func main {
    json JSON = JSONFromFile("Web.MsHtml.json")

    if json.kind() == ::UNDEFINED {
        print("Failed to load json")
    } else {
        Constants <JSON> List = json.field("Constants").array().get()
        Constant0 JSON = Constants.get(0)
        print(Constant0.field("Name").string().get())
    }
}

You will see how fast it is compared to your parser.

from objeck-lang.

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.