# Problem with many tikz picture for every rendering

I have many tikz picture in my text, and for every rendering of LATEX, I waste hours to external pdf is produced. If there is a way to define samples=100 as a variable, (like var1:=100 in programming) in main tex file to set it with for example '5' and when I want to obtain final pdf file, set sample with 100.