How do I turn off this line in weight painting?
What has happened is that you have activated a feature called Stabilize Stroke, which can be found in the Active Tool Tab of the Properties Panel, under the Stroke Section. It is very easy to enable this feature by accident, by inadvertently pressing its shortcut, which is Shift + s. The reason it is slow is because it gives up draw performance in order to facilitate a more precise line result. The same feature exists in Sculpt Mode, and can be accessed the same way.