Cleanup: avoid addition with large strings in Python
This is known to be inefficient, use a second write call instead.
This commit is contained in:
parent
9f7d84b656
commit
f326b6a18e
|
@ -84,7 +84,8 @@ def update_script_node(node, report):
|
|||
if script.is_in_memory or script.is_dirty or script.is_modified or not os.path.exists(osl_path):
|
||||
# write text datablock contents to temporary file
|
||||
osl_file = tempfile.NamedTemporaryFile(mode='w', suffix=".osl", delete=False)
|
||||
osl_file.write(script.as_string() + "\n")
|
||||
osl_file.write(script.as_string())
|
||||
osl_file.write("\n")
|
||||
osl_file.close()
|
||||
|
||||
ok, oso_path = osl_compile(osl_file.name, report)
|
||||
|
|
Loading…
Reference in New Issue