I open a very large YAML file. It takes time. But after its discovery, it prints all its contents - and this requires many times more time.
So, how can I avoid the print result in the Ruby console:
data = YAML.load_file( ... ) # some 1GB data file.
I assume you are doing this in the console. I usually only add ";: ok" if I don't want to see the result.
data = YAML.load_file( ... ) ; :ok
In Pry, you can suppress output by simply adding a semicolon:
pry(main)> data = YAML.load_file( ... ); pry(main)>
Suppression of output is explained in the wiki here
Source: https://habr.com/ru/post/896967/More articles:Saving URL parameters during PHP redirection - htmlIs $ _SERVER ['QUERY_STRING'] safe for XSS? - httpHow to remove ruby ββfrom my cygwin installation - ruby ββ| fooobar.comhow to convert json to php object in symfony2? - jsonBest way to check if a list is null? - schemeGit Extensions used with SVN repositories? - gitIs there any difference in speed when ordering int vs. float? - performanceThe hash (symbol) in shared addresses for affiliate purposes is deleted in Wall - urlHow to simulate the "relative" time in the database? - timeVery slow mysql-based deletion with subquery - mysqlAll Articles