I would advise that you do try to learn all your repertoire by memory ............. There are many methods that can help you do this more efficiently. Understanding the underlying structure of the piece will help a great deal, to avoid it being one endless run of notes that don't make logical sense. Break the piece up into pages also, anything that allows you to conquer one bit at a time. And then there's just good old repetition. Try to play from beginning to end again and again, and note any places you have trouble and go back and focus on them. I would also strongly advise playing in front of people. Something that can seem easy with no pressure of someone listening can suddenly become difficult with an audience.
I think putting in the hours are of course important, because your muscles often take a certain amount of time to develop and memorise the movements. But I would also strongly advocate for shorter and more focused practice. Alternating between both intentions exercises different parts of your focus - one is encouraging automatic muscle movements and stamina, the other mental focus and instant problem solving. If you are finding a passage really hard, put your violin down and ask yourself 'what is not sounding good, and why?' I would also strongly advise some isolated practice on the basics of playing. Sound production and intonation. Sound is often neglected.