Question: what are the disadvantages of using libraries?
Answer: One of the biggest disadvantages of using a library is trust. You trust code developed by some 3rd party to be optimal in terms of runtime and memory, expect it to be bug-free and provide you with the exact functionalities you're looking for. You would also have to include a lot of unnecessary code in your application.