20
noder
6y

Found this gem of a comment in a code base written 4 years back.

/*
Invoke <Service Base URL>/asset/v2/details/<SN> to get asset details
Feeling very bad to include this call, but we really need to use this !!!
This call is gonna take ~20s to respond. I've even increased the overall timeout of this module, just for this call !!!
So, if you are looking to debug any performance issue, I wish you jump directly here,
remove this call and just use master data management (MDM)
P.S: It is not that simple, as MDM and this asset DB (both asset masters) has differences in how the asset is defined :(
*/

Still trying to understand how to remove this costly time-consuming call and replace with an efficient one !!

And, of-course, the original author left 2 years back :(

Comments
  • 7
    at least the dev who was writing this was honest with you and even pointed out the fix for that
  • 1
    eliminate the differences between the dbs.
  • 4
    Actually it's one of the most helpful comments I've ever seen.. I wish my old colleagues were so helpful with comments. Usually it's just:

    // Had to add it because yes
    // return Array | string | Object | undefined

    (And the person always leave the company before you see it)
Add Comment