travis.rb icon indicating copy to clipboard operation
travis.rb copied to clipboard

Travis CLI is extremely slow

Open ELLIOTTCABLE opened this issue 8 years ago • 3 comments

So, every single travis command is executing extremely slowly on my machine.

I've completely nuked my entire Ruby setup (this is important to me, as there's a couple travis commands in my “sit down at a project and get an overview before starting to work” command, which I run upon opening of basically any new terminal window), and even when I pare it down to OS X's default system-Ruby (2.0.0), and a fresh version of Travis via sudo gem install travis, I'm getting the following:

> time travis whoami --debug
** Loading "/Users/ec/.travis/config.yml"
** Timeout::Error: execution expired
** GET "users/"
**   took 0.16 seconds
You are ELLIOTTCABLE
** Storing "/Users/ec/.travis/config.yml"
travis whoami --debug  0.30s user 0.09s system 3% cpu 11.152 total

Every single travis invocation seems to have ~12s lag; and for the life of me, I can't figure out why. This is reproduced on multiple networks (and as shown above, the actual HTTP requests don't seem to take very long). Anecdotally, ~50% of the time seems to be spent before the “Loading config.yml” line, and a further ~50% seems to be spent between that line and the Timeout::Error. Negligable time is spent after the Timeout::Error.

Any further debugging information I can produce for you guys, I will try to — just let me know — but I gotta get this down to a reasonable period! )=

ELLIOTTCABLE avatar Feb 01 '17 21:02 ELLIOTTCABLE

$ time travis --help
Usage: travis COMMAND ...

Available commands:

	accounts       displays accounts and their subscription status
	branches       displays the most recent build for each branch
	cache          lists or deletes repository caches
	cancel         cancels a job or build
	console        interactive shell
	disable        disables a project
	enable         enables a project
	encrypt        encrypts values for the .travis.yml
	encrypt-file   encrypts a file and adds decryption steps to .travis.yml
	endpoint       displays or changes the API endpoint
	env            show or modify build environment variables
	help           helps you out when in dire need of information
	history        displays a projects build history
	init           generates a .travis.yml and enables the project
	lint           display warnings for a .travis.yml
	login          authenticates against the API and stores the token
	logout         deletes the stored API token
	logs           streams test logs
	monitor        live monitor for what's going on
	open           opens a build or job in the browser
	pubkey         prints out a repository's public key
	raw            makes an (authenticated) API call and prints out the result
	report         generates a report useful for filing issues
	repos          lists repositories the user has certain permissions on
	requests       lists recent requests
	restart        restarts a build or job
	settings       access repository settings
	setup          sets up an addon or deploy target
	show           displays a build or job
	sshkey         checks, updates or deletes an SSH key
	status         checks status of the latest build
	sync           triggers a new sync with GitHub
	token          outputs the secret API token
	version        outputs the client version
	whatsup        lists most recent builds
	whoami         outputs the current user

run `travis help COMMAND` for more infos
travis --help  0.73s user 0.19s system 59% cpu 1.540 total

hroptatyr avatar Jun 09 '17 14:06 hroptatyr

Anything on this? Encrypting environment variables and setting some within my repository takes several minutes! The actual request on the website takes less than a second.

carlosonunez avatar Apr 05 '18 06:04 carlosonunez

Could this be a duplicate of https://github.com/travis-ci/travis.rb/issues/319? Could you look at the size of ~/.travis/config.yml?

BanzaiMan avatar Apr 08 '20 20:04 BanzaiMan