Deepstream python app fakesink does not work

I dont know if I did this right but I change the pipeline:

Summary of the changes:

Creating the sink

        if self.NO_DISPLAY:
            logging.debug("Creating Fakesink \n")
            sink = Gst.ElementFactory.make("fakesink", "nvvideo-renderer")
            sink.set_property('enable-last-sample', 0)
            sink.set_property('sync', 0)

Adding pipeline elements:

        pipeline.add(sink)    
        if not self.NO_DISPLAY:
            pipeline.add(transform)

linking the elements:

        if self.NO_DISPLAY:
            queue5.link(sink)
        else:
            queue5.link(transform)
            transform.link(sink)

Why do I have to remove transform?
Secondly. Will this have any impact on performance?