Search Unity

Question What is "Controller.SendData" and why is it allocating so much garbage?

Discussion in 'Editor & General Support' started by JoeStrout, Oct 26, 2022.

  1. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I'm trying to track down a periodic dramatic hitch in our framerate. I caught an instance of it while deep profiling, and the culprit seems to be Controller.SendData():

    upload_2022-10-26_9-23-50.png

    ...or, possibly, it's garbage collection, but Controller.SendData seems largely responsible for that too.

    But we don't have any such class in our code. Nor can I find anything about it in the Unity reference, though maybe it's an internal class. It's even possible that it's part of the profiler connection, and I'm chasing a red herring. Anybody know what this is, or a way to find out?
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Found it! It's part of Mixpanel. Looks like Mixpanel is allocating many MB of garbage whenever it kicks in.
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Is that part of Unity? Or did you install that?
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    It's installed via the PackageManager.
     
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Let me rephrase my question.

    Is Mixpanel a core part of Unity that I would likely install by default in a new project?

    Or is it a specific package that you said "I want Mixpanel!" and included it via PM?
     
  6. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    It's not a core part of Unity, and it's not something I would choose (probably ever). This is a team project, and somebody else installed it at the behest of the director.
     
    Kurt-Dekker likes this.