Feature Idea: Size of Library

The Andorid library adds more than 3000 methods to the dex count of every app. Internally there is a version of the GSON library as a copy.
Would it be possible to remove this code or split it to its own dependency, so that any app already using GSON do no have to have these 800+ extra methods in their app. It would reduce the library from New Reliec with almost 25% in method count.


New Relic edit

  • I want this, too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.

Hello!

As you have noticed, the Android agent does come pre-packaged with a GSON library that we test against within the agent. We use this library specifically so that we have a known quantity and to improve stability. Removing this library or using other versions of GSON could upset that and introduce bugs or cause unexpected activity. Therefore, I would strongly recommend not adjusting the GSON library that comes packaged with the agent. :slight_smile:

I still think that it should be possible for you to split the library in two, and lets users who want to use their standard GSON dependency provide that.
As you note, you already have tests running, so it should be possible for you to test the recent versions of GSON and make a list of versions you are sure will work.
This would also free you from having to update your library and maintain your own GSON version in the future :wink:

1 Like

Smart thinking, @jeppe.leth! I went ahead and added a poll to your ideas so that we can see how many others in the community would benefit from this! Thanks! :blush: