Goldie Homepage

Documentation (v0.3)
Goldie -> Documentation (v0.3) -> FAQ

FAQ

Q: Are these questions really frequently-asked?

A: No, not as of this writing. I'm just anticipating them.

Q: My code is running slow and/or using a lot of memory!

A: There are a few possible causes:

  • Are you accessing the Language tables directly? Or any other property of any class that returns an array?

    Grab it just once and cache it. Since D1's type system doesn't support read-only views of data (like D2's transitive const), any read-only array properties in Goldie return a duplicate to ensure encapsulation. (This will be fixed when Goldie moves to D2).

  • Does your grammar use any of GOLD's extended character sets (such as {Letter Extended} or {Printable Extended})?

    Goldie doesn't do character set optimization yet (although it is planned), so large character sets are likely to be slow and memory-intensive. Try sticking with ASCII-only in your grammar until Goldie implements this optimization.

  • Are you making heavy use of Language.ruleIdOf?

    Language.ruleIdOf currently uses a quick-and-dirty implementation that is likely to be slow. Try reducing your reliance on it, or caching its results, until it can be optimized.