Skip to content

Optimize xpns_log_filenames & xpns_arr2args functions#182

Merged
greymd merged 2 commits intogreymd:masterfrom
ReDTerraN:optimizesed
Apr 1, 2023
Merged

Optimize xpns_log_filenames & xpns_arr2args functions#182
greymd merged 2 commits intogreymd:masterfrom
ReDTerraN:optimizesed

Conversation

@ReDTerraN
Copy link
Contributor

@ReDTerraN ReDTerraN commented Mar 31, 2023

In this patch we optimize xpns_log_filenames to not spawn another sed process while being ran.
also optimizing xpns_arr2args using a more more efficient syntax for iterating over the array, this is done by using _arg in "$@" directly instead of declaring _arg="${i}" every loop. As well as optimizing sed usage.

I have done some preliminary testing making sure that its working as expected, but I have not compiled and ran it. Please have a look before merging

Thanks for a great tool, cheers.

@ReDTerraN
Copy link
Contributor Author

to clarify, with preliminary testing I mean checking that the sed works and that smoke screen tests went green.

@greymd greymd self-requested a review March 31, 2023 19:52
shfmt -i 2 -ci -sr -kp -d -w ./bin/xpanes
@greymd greymd merged commit f002be0 into greymd:master Apr 1, 2023
@greymd
Copy link
Owner

greymd commented Apr 1, 2023

looks good. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants