[NOT EXPECTED] AOT generation

Forums 💬 NodeCanvas ⚙️ Support [NOT EXPECTED] AOT generation

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #16036
    driiade
    Participant

      Hello,

      AOT generation is a bit broken I think. It generates a lot of classes for nothing, some are not used in graph but still exist on AOT.

      For example Template<T> will be matched with a lot of classes not used in graph where you match T with 1 or 2 classes.

      “Template<T> where T is “a class” ” doesn’t generate AOT classes, which break project code architecture and some work around to delete the where constraint can be a pain.

      Maybe you can rework this part by looking what graph are in the game and generate AOT accordingling to this ? I know there is Graph in scene too which can lead to much trouble for this, but the fact is the current aot generation create a lot of useless classes in the binary ?

      Maybe provide a way, from a graph, to add AOT automatically, and not add classes in prefered type ?

      #16040
      Gavalakis
      Keymaster

        Hello there,

        I do agree that AOTGenerator is agnostic of what the graphs use. That is indeed mostly due to the reason that graphs can live in scenes which is a total pain to parse as you know. This is why AOT classes are simply generated based on what types exist in the Preferred Types Editor. Of course, only struct are used as generic arguments, since only structs have a problem with AOT (as far as generics go). Does the number of classes generated bothering you for performance reasons or something else?

        Can you please clarify what the problem with where T:class is? As explained above, only generics that use structs as arguments are AOT generated. where T:class denotes that the argument is not a struct (its a class 🙂 ). This is why there is no generation done for Template since it is not really needed for AOT.

        Let me know.
        Thanks!

        #16039
        driiade
        Participant

          Oh I didn t know only struct were needed. And yes I used Template<T> where T is Enum … so not a class haha. And this one do not generated AOT which lead in non architectured code if you delete the constraint.

           

          I don t know the impact of useless classes in binaries. And We don t have trouble with it. But the less is the better. And I really enjoy your tool (which makes one of th best Apple Arcade Games >,>) that s why I want it to evolve =)

          #16038
          Gavalakis
          Keymaster

            Hello again,

            The Enum constraint was fixed a couple of days ago and will be there in the next version. I can send you the fix in your registered email account if you like however. Let me know 🙂

            Thanks!

            #16037
            driiade
            Participant

              Hey !

               

              Ok cool =)

              Will wait for the next time I update the project. It s not a problem for the moment. Will wait to pass the content release. Tahnk you 🙂

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.