Skip to content

Commit

Permalink
Merge pull request #2400 from tanmoysrt/perf_build
Browse files Browse the repository at this point in the history
perf(build): Reduce gzip compression level in packaging build context
  • Loading branch information
adityahase authored Jan 14, 2025
2 parents ee2c3a1 + 1302a32 commit 22305dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"requirements.txt",
"press/utils/country_timezone.py"
],
"words": [
"words": [
"githubusercontent",
"commitlint",
"EDITMSG",
Expand Down
7 changes: 5 additions & 2 deletions press/press/doctype/deploy_candidate/deploy_candidate.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,11 @@ def fix_content_permission(tarinfo):
return tarinfo

tmp_file_path = tempfile.mkstemp(suffix=".tar.gz")[1]
with tarfile.open(tmp_file_path, "w:gz") as tar:
tar.add(self.build_directory, arcname=".", filter=fix_content_permission)
with tarfile.open(tmp_file_path, "w:gz", compresslevel=5) as tar:
if frappe.conf.developer_mode:
tar.add(self.build_directory, arcname=".", filter=fix_content_permission)
else:
tar.add(self.build_directory, arcname=".")

step.status = "Success"
step.duration = get_duration(start_time)
Expand Down

0 comments on commit 22305dc

Please sign in to comment.