never mind.
i made these changes and its not laggy at all.
smoothFilter.setInputConnection(stlReader.getOutputPort());
mapper.setInputConnection(normals.getOutputPort());
normals.setInputConnection(smoothFilter.getOutputPort());
smoothFilter.setInputData(stlReader.getOutputData());
mapper.setInputData(normals.getOutputData());
normals.setInputData(smoothFilter.getOutputData());
so i just added setInputData after setInputConnection. I have no idea why it helped