GithubHelp home page GithubHelp logo

Comments (4)

billw2012 avatar billw2012 commented on July 20, 2024 1

A few things you could consider:

  • Documenting this limitation, e.g.

    Simply add IngameDebugConsole.ConsoleMethod attribute to your functions. These functions must be public, static and must reside in a public class in the Assembly-CSharp.dll assembly (i.e. if your code is in custom assemblies, as will happen if you use asmdefs, the attributes will not be detected).

  • The amount of time it will take to iterate all types in the Assembly.CSharp.dll is already not under your control. It could still be slow if there is a lot of code.
  • It takes ~130ms for me with no optimization, for me this is no problem for debug initialization code to take this long when it runs only once, however I have no doubt it could be optimized by a factor of 10 or more by e.g. excluding a bunch of known modules.

from unityingamedebugconsole.

yasirkula avatar yasirkula commented on July 20, 2024

Yes I'm aware of this limitation. That's why I like the DebugLogConsole.AddCommand functions. I'm inspecting only Assembly-CSharp purely for performance reasons. I fear including all assemblies in the search would take significantly more time and it would be unpreferable for users who aren't interested in custom commands.

from unityingamedebugconsole.

billw2012 avatar billw2012 commented on July 20, 2024

I tried to optimize the assembly list and could only get it down to ~25ms by excluding modules based on name prefix (which isn't bullet proof), and company attribute value. This still left 14 out of 120 assemblies, all my plugins and game code.
Its a shame that module attributes are so inconsistently applied. e.g. having one generated automatically for each asmdef module would help in this case, but there isn't any such thing.

from unityingamedebugconsole.

yasirkula avatar yasirkula commented on July 20, 2024

I've omitted most of the built-in assemblies from the search. Hopefully it will be pretty fast.

from unityingamedebugconsole.

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.