monarch-initiative / biolink-api

API for linked biological knowledge
https://api.monarchinitiative.org/api/
BSD 3-Clause "New" or "Revised" License
64 stars 25 forks source link

biolink json response: beautifier nearly double payload size #307

Closed lpalbou closed 5 years ago

lpalbou commented 5 years ago

I was trying to update the GO BioLink API and during my tests, I saw a ~ double increase in payload response for the same slimmer query:

2.3MB:

Screen Shot 2019-07-29 at 5 35 57 PM Screen Shot 2019-07-29 at 6 06 23 PM

4.1MB:

Screen Shot 2019-07-29 at 5 36 09 PM Screen Shot 2019-07-29 at 6 06 13 PM

Query:

https://api.geneontology.org/api/bioentityset/slimmer/function?&slim=GO:0016491&slim=GO:0016787&slim=GO:0016740&slim=GO:0016874&slim=GO:0030234&slim=GO:0038023&slim=GO:0005102&slim=GO:0005215&slim=GO:0005198&slim=GO:0008092&slim=GO:0003677&slim=GO:0003723&slim=GO:0003700&slim=GO:0008134&slim=GO:0036094&slim=GO:0046872&slim=GO:0030246&slim=GO:0097367&slim=GO:0008289&slim=GO:0003674&slim=GO:0007049&slim=GO:0016043&slim=GO:0051234&slim=GO:0008283&slim=GO:0030154&slim=GO:0008219&slim=GO:0032502&slim=GO:0000003&slim=GO:0002376&slim=GO:0050877&slim=GO:0050896&slim=GO:0023052&slim=GO:0006259&slim=GO:0016070&slim=GO:0019538&slim=GO:0005975&slim=GO:1901135&slim=GO:0006629&slim=GO:0042592&slim=GO:0009056&slim=GO:0065009&slim=GO:0050789&slim=GO:0007610&slim=GO:0008150&slim=GO:0005576&slim=GO:0005886&slim=GO:0045202&slim=GO:0030054&slim=GO:0042995&slim=GO:0031410&slim=GO:0005768&slim=GO:0005773&slim=GO:0005794&slim=GO:0005783&slim=GO:0005829&slim=GO:0005739&slim=GO:0005634&slim=GO:0005694&slim=GO:0005856&slim=GO:0032991&slim=GO:0005575&subject=MGI:88276&rows=-1

4.1MB for a single gene is much too high. Is there a parameter to disable the json beautifier for all responses / all bio link routes ?

Thanks !

lpalbou commented 5 years ago

I setup a server with the same code and somehow the json response is not beautified.. Somehow the code running locally and on a server is not behaving exactly the same.

Closing that ticket for now.