nvbn / thefuck

Magnificent app which corrects your previous console command.
MIT License
85.29k stars 3.44k forks source link

`fuck` is inordinately slow, even with instant mode enabled #1463

Open bbrk24 opened 2 months ago

bbrk24 commented 2 months ago

The output of thefuck --version (something like The Fuck 3.1 using Python 3.5.0 and Bash 4.4.12(1)-release):

The Fuck 3.32 using Python 3.10.12 and Bash 5.1.16(1)-release

Your system (Debian 7, ArchLinux, Windows, etc.):

Ubuntu 22.04 in WSL2 on Windows 11

How to reproduce the bug:

$ time npm lint >/dev/null

real    0m0.991s
user    0m0.401s
sys     0m0.154s

$ time fuck --yeah >/dev/null
​​​​​​​​​​time npm lint

real    0m0.239s
user    0m0.233s
sys     0m0.058s

real    0m11.352s
user    0m0.494s
sys     0m0.702s

The output of The Fuck with THEFUCK_DEBUG=true exported (typically execute export THEFUCK_DEBUG=true in your shell before The Fuck):

DEBUG: Run with settings: {'alter_history': True,
 'debug': True,
 'env': {'GIT_TRACE': '1', 'LANG': 'C', 'LC_ALL': 'C'},
 'exclude_rules': [],
 'excluded_search_path_prefixes': [],
 'history_limit': None,
 'instant_mode': True,
 'no_colors': False,
 'num_close_matches': 3,
 'priority': {},
 'repeat': False,
 'require_confirmation': False,
 'rules': [<const: All rules enabled>],
 'slow_commands': ['lein', 'react-native', 'gradle', './gradlew', 'vagrant'],
 'user_dir': PosixPath('/home/bbrk24/.config/thefuck'),
 'wait_command': 3,
 'wait_slow_command': 15}
DEBUG: Received output: bbrk24@cdlemon:~/workspace/Trilangle/wasm$ fuck --yeah &>log.txt
DEBUG: Read output from log took: 0:00:00.005416
DEBUG: Importing rule: adb_unknown_command; took: 0:00:00.000390
DEBUG: Importing rule: ag_literal; took: 0:00:00.000527
DEBUG: Importing rule: apt_get; took: 0:00:00.031054
DEBUG: Importing rule: apt_get_search; took: 0:00:00.000338
DEBUG: Importing rule: apt_invalid_operation; took: 0:00:00.000966
DEBUG: Importing rule: apt_list_upgradable; took: 0:00:00.000342
DEBUG: Importing rule: apt_upgrade; took: 0:00:00.000314
DEBUG: Importing rule: aws_cli; took: 0:00:00.000316
DEBUG: Importing rule: az_cli; took: 0:00:00.000416
DEBUG: Importing rule: brew_cask_dependency; took: 0:00:00.024749
DEBUG: Importing rule: brew_install; took: 0:00:00.000439
DEBUG: Importing rule: brew_link; took: 0:00:00.000344
DEBUG: Importing rule: brew_reinstall; took: 0:00:00.000716
DEBUG: Importing rule: brew_uninstall; took: 0:00:00.000397
DEBUG: Importing rule: brew_unknown_command; took: 0:00:00.000319
DEBUG: Importing rule: brew_update_formula; took: 0:00:00.000443
DEBUG: Importing rule: cargo; took: 0:00:00.000322
DEBUG: Importing rule: cargo_no_command; took: 0:00:00.000450
DEBUG: Importing rule: cat_dir; took: 0:00:00.000351
DEBUG: Importing rule: cd_correction; took: 0:00:00.001006
DEBUG: Importing rule: cd_cs; took: 0:00:00.000215
DEBUG: Importing rule: cd_mkdir; took: 0:00:00.000129
DEBUG: Importing rule: cd_parent; took: 0:00:00.000248
DEBUG: Importing rule: chmod_x; took: 0:00:00.000222
DEBUG: Importing rule: choco_install; took: 0:00:00.047638
DEBUG: Importing rule: composer_not_command; took: 0:00:00.002760
DEBUG: Importing rule: conda_mistype; took: 0:00:00.000712
DEBUG: Importing rule: cp_create_destination; took: 0:00:00.000438
DEBUG: Importing rule: cp_omitting_directory; took: 0:00:00.000394
DEBUG: Importing rule: cpp11; took: 0:00:00.000367
DEBUG: Importing rule: dirty_untar; took: 0:00:00.001552
DEBUG: Importing rule: dirty_unzip; took: 0:00:00.001335
DEBUG: Importing rule: django_south_ghost; took: 0:00:00.000350
DEBUG: Importing rule: django_south_merge; took: 0:00:00.000452
DEBUG: Importing rule: dnf_no_such_command; took: 0:00:00.027298
DEBUG: Importing rule: docker_image_being_used_by_container; took: 0:00:00.000995
DEBUG: Importing rule: docker_login; took: 0:00:00.000479
DEBUG: Importing rule: docker_not_command; took: 0:00:00.026065
DEBUG: Importing rule: dry; took: 0:00:00.000582
DEBUG: Importing rule: fab_command_not_found; took: 0:00:00.000420
DEBUG: Importing rule: fix_alt_space; took: 0:00:00.000350
DEBUG: Importing rule: fix_file; took: 0:00:00.002169
DEBUG: Importing rule: gem_unknown_command; took: 0:00:00.022072
DEBUG: Importing rule: git_add; took: 0:00:00.001261
DEBUG: Importing rule: git_add_force; took: 0:00:00.000360
DEBUG: Importing rule: git_bisect_usage; took: 0:00:00.000415
DEBUG: Importing rule: git_branch_0flag; took: 0:00:00.000394
DEBUG: Importing rule: git_branch_delete; took: 0:00:00.000470
DEBUG: Importing rule: git_branch_delete_checked_out; took: 0:00:00.000400
DEBUG: Importing rule: git_branch_exists; took: 0:00:00.000422
DEBUG: Importing rule: git_branch_list; took: 0:00:00.000384
DEBUG: Importing rule: git_checkout; took: 0:00:00.000427
DEBUG: Importing rule: git_clone_git_clone; took: 0:00:00.000315
DEBUG: Importing rule: git_commit_add; took: 0:00:00.000287
DEBUG: Importing rule: git_commit_amend; took: 0:00:00.000317
DEBUG: Importing rule: git_commit_reset; took: 0:00:00.000317
DEBUG: Importing rule: git_diff_no_index; took: 0:00:00.000323
DEBUG: Importing rule: git_diff_staged; took: 0:00:00.000282
DEBUG: Importing rule: git_fix_stash; took: 0:00:00.000290
DEBUG: Importing rule: git_flag_after_filename; took: 0:00:00.000294
DEBUG: Importing rule: git_help_aliased; took: 0:00:00.000259
DEBUG: Importing rule: git_hook_bypass; took: 0:00:00.000340
DEBUG: Importing rule: git_lfs_mistype; took: 0:00:00.000313
DEBUG: Importing rule: git_main_master; took: 0:00:00.000375
DEBUG: Importing rule: git_merge; took: 0:00:00.000285
DEBUG: Importing rule: git_merge_unrelated; took: 0:00:00.000303
DEBUG: Importing rule: git_not_command; took: 0:00:00.000296
DEBUG: Importing rule: git_pull; took: 0:00:00.000320
DEBUG: Importing rule: git_pull_clone; took: 0:00:00.000296
DEBUG: Importing rule: git_pull_uncommitted_changes; took: 0:00:00.000298
DEBUG: Importing rule: git_push; took: 0:00:00.000285
DEBUG: Importing rule: git_push_different_branch_names; took: 0:00:00.000293
DEBUG: Importing rule: git_push_force; took: 0:00:00.000332
DEBUG: Importing rule: git_push_pull; took: 0:00:00.000322
DEBUG: Importing rule: git_push_without_commits; took: 0:00:00.000348
DEBUG: Importing rule: git_rebase_merge_dir; took: 0:00:00.000492
DEBUG: Importing rule: git_rebase_no_changes; took: 0:00:00.000326
DEBUG: Importing rule: git_remote_delete; took: 0:00:00.000359
DEBUG: Importing rule: git_remote_seturl_add; took: 0:00:00.000327
DEBUG: Importing rule: git_rm_local_modifications; took: 0:00:00.000551
DEBUG: Importing rule: git_rm_recursive; took: 0:00:00.000347
DEBUG: Importing rule: git_rm_staged; took: 0:00:00.000287
DEBUG: Importing rule: git_stash; took: 0:00:00.000305
DEBUG: Importing rule: git_stash_pop; took: 0:00:00.000293
DEBUG: Importing rule: git_tag_force; took: 0:00:00.000308
DEBUG: Importing rule: git_two_dashes; took: 0:00:00.000329
DEBUG: Importing rule: go_run; took: 0:00:00.000352
DEBUG: Importing rule: go_unknown_command; took: 0:00:00.027082
DEBUG: Importing rule: gradle_no_task; took: 0:00:00.000807
DEBUG: Importing rule: gradle_wrapper; took: 0:00:00.000605
DEBUG: Importing rule: grep_arguments_order; took: 0:00:00.001509
DEBUG: Importing rule: grep_recursive; took: 0:00:00.000647
DEBUG: Importing rule: grunt_task_not_found; took: 0:00:00.000695
DEBUG: Importing rule: gulp_not_task; took: 0:00:00.000407
DEBUG: Importing rule: has_exists_script; took: 0:00:00.000318
DEBUG: Importing rule: heroku_multiple_apps; took: 0:00:00.000269
DEBUG: Importing rule: heroku_not_command; took: 0:00:00.000282
DEBUG: Importing rule: history; took: 0:00:00.000254
DEBUG: Importing rule: hostscli; took: 0:00:00.000414
DEBUG: Importing rule: ifconfig_device_not_found; took: 0:00:00.000460
DEBUG: Importing rule: java; took: 0:00:00.000302
DEBUG: Importing rule: javac; took: 0:00:00.000355
DEBUG: Importing rule: lein_not_task; took: 0:00:00.000372
DEBUG: Importing rule: ln_no_hard_link; took: 0:00:00.000410
DEBUG: Importing rule: ln_s_order; took: 0:00:00.000397
DEBUG: Importing rule: long_form_help; took: 0:00:00.000247
DEBUG: Importing rule: ls_all; took: 0:00:00.000328
DEBUG: Importing rule: ls_lah; took: 0:00:00.000467
DEBUG: Importing rule: man; took: 0:00:00.000320
DEBUG: Importing rule: man_no_space; took: 0:00:00.000274
DEBUG: Importing rule: mercurial; took: 0:00:00.000395
DEBUG: Importing rule: missing_space_before_subcommand; took: 0:00:00.000299
DEBUG: Importing rule: mkdir_p; took: 0:00:00.000286
DEBUG: Importing rule: mvn_no_command; took: 0:00:00.000283
DEBUG: Importing rule: mvn_unknown_lifecycle_phase; took: 0:00:00.000316
DEBUG: Importing rule: nixos_cmd_not_found; took: 0:00:00.029214
DEBUG: Importing rule: no_command; took: 0:00:00.000718
DEBUG: Importing rule: no_such_file; took: 0:00:00.000415
DEBUG: Importing rule: npm_missing_script; took: 0:00:00.000797
DEBUG: Importing rule: npm_run_script; took: 0:00:00.000312
DEBUG: Importing rule: npm_wrong_command; took: 0:00:00.000340
DEBUG: Importing rule: omnienv_no_such_command; took: 0:00:00.103612
DEBUG: Importing rule: open; took: 0:00:00.003170
DEBUG: Importing rule: pacman; took: 0:00:00.088412
DEBUG: Importing rule: pacman_invalid_option; took: 0:00:00.000841
DEBUG: Importing rule: pacman_not_found; took: 0:00:00.000348
DEBUG: Importing rule: path_from_history; took: 0:00:00.000307
DEBUG: Importing rule: php_s; took: 0:00:00.000345
DEBUG: Importing rule: pip_install; took: 0:00:00.000337
DEBUG: Importing rule: pip_unknown_command; took: 0:00:00.000408
DEBUG: Importing rule: port_already_in_use; took: 0:00:00.000411
DEBUG: Importing rule: prove_recursively; took: 0:00:00.000416
DEBUG: Importing rule: python_command; took: 0:00:00.000343
DEBUG: Importing rule: python_execute; took: 0:00:00.000429
DEBUG: Importing rule: python_module_error; took: 0:00:00.000269
DEBUG: Importing rule: quotation_marks; took: 0:00:00.000250
DEBUG: Importing rule: rails_migrations_pending; took: 0:00:00.000347
DEBUG: Importing rule: react_native_command_unrecognized; took: 0:00:00.000404
DEBUG: Importing rule: remove_shell_prompt_literal; took: 0:00:00.000276
DEBUG: Importing rule: remove_trailing_cedilla; took: 0:00:00.000388
DEBUG: Importing rule: rm_dir; took: 0:00:00.000262
DEBUG: Importing rule: rm_root; took: 0:00:00.000279
DEBUG: Importing rule: scm_correction; took: 0:00:00.000388
DEBUG: Importing rule: sed_unterminated_s; took: 0:00:00.000312
DEBUG: Importing rule: sl_ls; took: 0:00:00.000252
DEBUG: Importing rule: ssh_known_hosts; took: 0:00:00.000346
DEBUG: Importing rule: sudo; took: 0:00:00.000323
DEBUG: Importing rule: sudo_command_from_user_path; took: 0:00:00.000376
DEBUG: Importing rule: switch_lang; took: 0:00:00.000333
DEBUG: Importing rule: systemctl; took: 0:00:00.000381
DEBUG: Importing rule: terraform_init; took: 0:00:00.000353
DEBUG: Importing rule: test.py; took: 0:00:00.000287
DEBUG: Importing rule: tmux; took: 0:00:00.000333
DEBUG: Importing rule: touch; took: 0:00:00.000436
DEBUG: Importing rule: tsuru_login; took: 0:00:00.000668
DEBUG: Importing rule: tsuru_not_command; took: 0:00:00.000447
DEBUG: Importing rule: unknown_command; took: 0:00:00.000331
DEBUG: Importing rule: unsudo; took: 0:00:00.000389
DEBUG: Importing rule: vagrant_up; took: 0:00:00.000359
DEBUG: Importing rule: whois; took: 0:00:00.000484
DEBUG: Importing rule: workon_doesnt_exists; took: 0:00:00.000355
DEBUG: Importing rule: wrong_hyphen_before_subcommand; took: 0:00:00.000334
DEBUG: Importing rule: yarn_alias; took: 0:00:00.000367
DEBUG: Importing rule: yarn_command_not_found; took: 0:00:00.000566
DEBUG: Importing rule: yarn_command_replaced; took: 0:00:00.000863
DEBUG: Importing rule: yarn_help; took: 0:00:00.000354
DEBUG: Importing rule: yum_invalid_operation; took: 0:00:00.033387
DEBUG: Trying rule: path_from_history; took: 0:00:00.000320
DEBUG: Trying rule: cd_cs; took: 0:00:00.000045
DEBUG: Trying rule: dry; took: 0:00:00.000005
DEBUG: Trying rule: git_stash_pop; took: 0:00:00.000054
DEBUG: Trying rule: test.py; took: 0:00:00.000003
DEBUG: Trying rule: adb_unknown_command; took: 0:00:00.000012
DEBUG: Trying rule: ag_literal; took: 0:00:00.000024
DEBUG: Trying rule: apt_get; took: 0:00:00.000003
DEBUG: Trying rule: apt_get_search; took: 0:00:00.000033
DEBUG: Trying rule: apt_invalid_operation; took: 0:00:00.000032
DEBUG: Trying rule: apt_list_upgradable; took: 0:00:00.000037
DEBUG: Trying rule: apt_upgrade; took: 0:00:00.000034
DEBUG: Trying rule: aws_cli; took: 0:00:00.000029
DEBUG: Trying rule: az_cli; took: 0:00:00.000029
DEBUG: Trying rule: brew_link; took: 0:00:00.000026
DEBUG: Trying rule: brew_reinstall; took: 0:00:00.000033
DEBUG: Trying rule: brew_uninstall; took: 0:00:00.000026
DEBUG: Trying rule: brew_update_formula; took: 0:00:00.000021
DEBUG: Trying rule: cargo; took: 0:00:00.000002
DEBUG: Trying rule: cargo_no_command; took: 0:00:00.000023
DEBUG: Trying rule: cat_dir; took: 0:00:00.000025
DEBUG: Trying rule: cd_correction; took: 0:00:00.000030
DEBUG: Trying rule: cd_mkdir; took: 0:00:00.000034
DEBUG: Trying rule: cd_parent; took: 0:00:00.000003
DEBUG: Trying rule: chmod_x; took: 0:00:00.000003
DEBUG: Trying rule: composer_not_command; took: 0:00:00.000026
DEBUG: Trying rule: conda_mistype; took: 0:00:00.000023
DEBUG: Trying rule: cp_create_destination; took: 0:00:00.000027
DEBUG: Trying rule: cp_omitting_directory; took: 0:00:00.000034
DEBUG: Trying rule: cpp11; took: 0:00:00.000025
DEBUG: Trying rule: dirty_untar; took: 0:00:00.000025
DEBUG: Trying rule: dirty_unzip; took: 0:00:00.000031
DEBUG: Trying rule: django_south_ghost; took: 0:00:00.000003
DEBUG: Trying rule: django_south_merge; took: 0:00:00.000003
DEBUG: Trying rule: docker_image_being_used_by_container; took: 0:00:00.000027
DEBUG: Trying rule: docker_login; took: 0:00:00.000021
DEBUG: Trying rule: docker_not_command; took: 0:00:00.000038
DEBUG: Trying rule: fab_command_not_found; took: 0:00:00.000032
DEBUG: Trying rule: fix_alt_space; took: 0:00:00.000017
DEBUG: Trying rule: fix_file; took: 0:00:00.000013
DEBUG: Trying rule: gem_unknown_command; took: 0:00:00.000023
DEBUG: Trying rule: git_add; took: 0:00:00.000030
DEBUG: Trying rule: git_add_force; took: 0:00:00.000025
DEBUG: Trying rule: git_bisect_usage; took: 0:00:00.000025
DEBUG: Trying rule: git_branch_0flag; took: 0:00:00.000030
DEBUG: Trying rule: git_branch_delete; took: 0:00:00.000030
DEBUG: Trying rule: git_branch_delete_checked_out; took: 0:00:00.000029
DEBUG: Trying rule: git_branch_exists; took: 0:00:00.000021
DEBUG: Trying rule: git_branch_list; took: 0:00:00.000019
DEBUG: Trying rule: git_checkout; took: 0:00:00.000019
DEBUG: Trying rule: git_clone_git_clone; took: 0:00:00.000027
DEBUG: Trying rule: git_commit_add; took: 0:00:00.000029
DEBUG: Trying rule: git_commit_amend; took: 0:00:00.000030
DEBUG: Trying rule: git_commit_reset; took: 0:00:00.000029
DEBUG: Trying rule: git_diff_no_index; took: 0:00:00.000026
DEBUG: Trying rule: git_diff_staged; took: 0:00:00.000025
DEBUG: Trying rule: git_fix_stash; took: 0:00:00.000029
DEBUG: Trying rule: git_flag_after_filename; took: 0:00:00.000026
DEBUG: Trying rule: git_help_aliased; took: 0:00:00.000025
DEBUG: Trying rule: git_lfs_mistype; took: 0:00:00.000029
DEBUG: Trying rule: git_merge; took: 0:00:00.000027
DEBUG: Trying rule: git_merge_unrelated; took: 0:00:00.000028
DEBUG: Trying rule: git_not_command; took: 0:00:00.000024
DEBUG: Trying rule: git_pull; took: 0:00:00.000023
DEBUG: Trying rule: git_pull_clone; took: 0:00:00.000023
DEBUG: Trying rule: git_pull_uncommitted_changes; took: 0:00:00.000022
DEBUG: Trying rule: git_push; took: 0:00:00.000028
DEBUG: Trying rule: git_push_different_branch_names; took: 0:00:00.000022
DEBUG: Trying rule: git_push_pull; took: 0:00:00.000061
DEBUG: Trying rule: git_push_without_commits; took: 0:00:00.000029
DEBUG: Trying rule: git_rebase_merge_dir; took: 0:00:00.000024
DEBUG: Trying rule: git_rebase_no_changes; took: 0:00:00.000023
DEBUG: Trying rule: git_remote_delete; took: 0:00:00.000024
DEBUG: Trying rule: git_remote_seturl_add; took: 0:00:00.000023
DEBUG: Trying rule: git_rm_local_modifications; took: 0:00:00.000023
DEBUG: Trying rule: git_rm_recursive; took: 0:00:00.000023
DEBUG: Trying rule: git_rm_staged; took: 0:00:00.000025
DEBUG: Trying rule: git_stash; took: 0:00:00.000026
DEBUG: Trying rule: git_tag_force; took: 0:00:00.000024
DEBUG: Trying rule: git_two_dashes; took: 0:00:00.000025
DEBUG: Trying rule: go_run; took: 0:00:00.000036
DEBUG: Trying rule: go_unknown_command; took: 0:00:00.000028
DEBUG: Trying rule: gradle_no_task; took: 0:00:00.000034
DEBUG: Trying rule: gradle_wrapper; took: 0:00:00.000020
DEBUG: Trying rule: grep_arguments_order; took: 0:00:00.000018
DEBUG: Trying rule: grep_recursive; took: 0:00:00.000041
DEBUG: Trying rule: grunt_task_not_found; took: 0:00:00.000028
DEBUG: Trying rule: gulp_not_task; took: 0:00:00.000030
DEBUG: Trying rule: has_exists_script; took: 0:00:00.000045
DEBUG: Trying rule: heroku_multiple_apps; took: 0:00:00.000046
DEBUG: Trying rule: heroku_not_command; took: 0:00:00.000027
DEBUG: Trying rule: hostscli; took: 0:00:00.000056
DEBUG: Trying rule: ifconfig_device_not_found; took: 0:00:00.000192
DEBUG: Trying rule: java; took: 0:00:00.000187
DEBUG: Trying rule: javac; took: 0:00:00.000047
DEBUG: Trying rule: lein_not_task; took: 0:00:00.000032
DEBUG: Trying rule: ln_no_hard_link; took: 0:00:00.000012
DEBUG: Trying rule: ln_s_order; took: 0:00:00.000009
DEBUG: Trying rule: ls_all; took: 0:00:00.000017
DEBUG: Trying rule: ls_lah; took: 0:00:00.000014
DEBUG: Trying rule: man; took: 0:00:00.000016
DEBUG: Trying rule: mercurial; took: 0:00:00.000072
DEBUG: Trying rule: mkdir_p; took: 0:00:00.000015
DEBUG: Trying rule: mvn_no_command; took: 0:00:00.000020
DEBUG: Trying rule: mvn_unknown_lifecycle_phase; took: 0:00:00.000013
DEBUG: Trying rule: no_such_file; took: 0:00:00.000560
DEBUG: Trying rule: npm_missing_script; took: 0:00:00.000050
DEBUG: Trying rule: npm_run_script; took: 0:00:00.000020
DEBUG: Trying rule: npm_wrong_command; took: 0:00:00.000025
DEBUG: Trying rule: open; took: 0:00:00.000020
DEBUG: Trying rule: pacman_invalid_option; took: 0:00:00.000037
DEBUG: Trying rule: php_s; took: 0:00:00.000041
DEBUG: Trying rule: pip_install; took: 0:00:00.000044
DEBUG: Trying rule: pip_unknown_command; took: 0:00:00.000039
DEBUG: Trying rule: port_already_in_use; took: 0:00:00.000420
DEBUG: Trying rule: prove_recursively; took: 0:00:00.000052
DEBUG: Trying rule: python_command; took: 0:00:00.000021
DEBUG: Trying rule: python_execute; took: 0:00:00.000028
DEBUG: Trying rule: python_module_error; took: 0:00:00.000002
DEBUG: Trying rule: quotation_marks; took: 0:00:00.000003
DEBUG: Trying rule: rails_migrations_pending; took: 0:00:00.000002
DEBUG: Trying rule: react_native_command_unrecognized; took: 0:00:00.000041
DEBUG: Trying rule: remove_shell_prompt_literal; took: 0:00:00.000004
DEBUG: Trying rule: remove_trailing_cedilla; took: 0:00:00.000004
DEBUG: Trying rule: rm_dir; took: 0:00:00.000019
DEBUG: Trying rule: scm_correction; took: 0:00:00.000028
DEBUG: Trying rule: sed_unterminated_s; took: 0:00:00.000020
DEBUG: Trying rule: sl_ls; took: 0:00:00.000002
DEBUG: Trying rule: ssh_known_hosts; took: 0:00:00.000020
DEBUG: Trying rule: sudo; took: 0:00:00.000010
DEBUG: Trying rule: sudo_command_from_user_path; took: 0:00:00.000053
DEBUG: Trying rule: switch_lang; took: 0:00:00.000003
DEBUG: Trying rule: systemctl; took: 0:00:00.000035
DEBUG: Trying rule: terraform_init; took: 0:00:00.000020
DEBUG: Trying rule: tmux; took: 0:00:00.000016
DEBUG: Trying rule: touch; took: 0:00:00.000032
DEBUG: Trying rule: tsuru_login; took: 0:00:00.000033
DEBUG: Trying rule: tsuru_not_command; took: 0:00:00.000028
DEBUG: Trying rule: unknown_command; took: 0:00:00.000172
DEBUG: Trying rule: unsudo; took: 0:00:00.000004
DEBUG: Trying rule: vagrant_up; took: 0:00:00.000046
DEBUG: Trying rule: whois; took: 0:00:00.000035
DEBUG: Trying rule: workon_doesnt_exists; took: 0:00:00.000030
DEBUG: Trying rule: yarn_alias; took: 0:00:00.000031
DEBUG: Trying rule: yarn_command_not_found; took: 0:00:00.000126
DEBUG: Trying rule: yarn_command_replaced; took: 0:00:00.000043
DEBUG: Trying rule: yarn_help; took: 0:00:00.000032
DEBUG: Trying rule: git_hook_bypass; took: 0:00:00.000026
DEBUG: Trying rule: git_main_master; took: 0:00:00.000027
DEBUG: Trying rule: man_no_space; took: 0:00:00.000004
DEBUG: Trying rule: no_command; took: 0:00:00.000025
DEBUG: Trying rule: missing_space_before_subcommand; took: 0:00:00.000008
DEBUG: Trying rule: wrong_hyphen_before_subcommand; took: 0:00:00.000018
DEBUG: Trying rule: long_form_help; took: 0:00:00.000278
DEBUG: Trying rule: history; took: 0:00:00.011258
​​​​​​​​​​npm run lint
DEBUG: PYTHONIOENCODING: utf-8
DEBUG: Total took: 0:00:11.895543

> lint
> ./lint.sh

(node:41892) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

/home/bbrk24/workspace/Trilangle/wasm/in.civet
  250:17  error  Expected an assignment or function call and instead saw an expression  @typescript-eslint/no-unused-expressions
  284:14  error  Expected an assignment or function call and instead saw an expression  @typescript-eslint/no-unused-expressions
  287:14  error  Expected an assignment or function call and instead saw an expression  @typescript-eslint/no-unused-expressions
  319:12  error  Expected an assignment or function call and instead saw an expression  @typescript-eslint/no-unused-expressions
  331:12  error  Expected an assignment or function call and instead saw an expression  @typescript-eslint/no-unused-expressions

✖ 5 problems (5 errors, 0 warnings)

Anything else you think is relevant:

The timing above was with instant mode enabled. It's even slower without instant mode enabled.

Looking through the debug logs, no individual step is unreasonably slow. There's just so many of them it takes more than ten seconds in total. At that rate I could retype it myself faster.
regentov commented 2 months ago

The same here, on windows python 3.12 with this fix

$ time thefuck --version The Fuck 3.32 using Python 3.12.2 and Bash

real 0m16,960s user 0m0,046s sys 0m0,109s

bbrk24 commented 2 months ago

I will note that it was 14.5s on my first run, but it gets a couple seconds faster on subsequent runs within the same terminal session.