aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | Merge pull request #32016 from SamSaffron/visitorsEileen M. Uchitelle2018-02-161-2/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | PERF: reduce retained objects in Journey
| * | | | | | | | PERF: reduce retained objects in JourneySam2018-02-161-2/+2
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: Total allocated: 209050523 bytes (2219202 objects) Total retained: 36580305 bytes (323462 objects) After: Total allocated: 209180253 bytes (2222455 objects) Total retained: 36515599 bytes (321850 objects) --- Modest saving of 1612 RVALUEs in the heap on Discourse boot The larger the route file the better the results. Saving will only be visible on Ruby 2.5 and up.
* | | | | | | | Merge pull request #32015 from ↵Eileen M. Uchitelle2018-02-161-0/+24
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JPrevost/activestorage_integration_test_cleanup_docs ActiveStorage file cleanup in Integration Tests
| * | | | | | | | ActiveStorage file cleanup in Integration TestsJeremy Prevost2018-02-151-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Documents ActiveStorage file cleanup in Integration Tests which is similar but slightly different than the existing docs for System Tests.
* | | | | | | | | Merge pull request #31900 from eileencodes/parallel-testingEileen M. Uchitelle2018-02-1612-7/+415
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | Parallel testing
| * | | | | | | | Add test parallelization to Railseileencodes2018-02-1512-7/+415
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provides both a forked process and threaded parallelization options. To use add `parallelize` to your test suite. Takes a `workers` argument that controls how many times the process is forked. For each process a new database will be created suffixed with the worker number; test-database-0 and test-database-1 respectively. If `ENV["PARALLEL_WORKERS"]` is set the workers argument will be ignored and the environment variable will be used instead. This is useful for CI environments, or other environments where you may need more workers than you do for local testing. If the number of workers is set to `1` or fewer, the tests will not be parallelized. The default parallelization method is to fork processes. If you'd like to use threads instead you can pass `with: :threads` to the `parallelize` method. Note the threaded parallelization does not create multiple database and will not work with system tests at this time. parallelize(workers: 2, with: :threads) The threaded parallelization uses Minitest's parallel exector directly. The processes paralleliztion uses a Ruby Drb server. For parallelization via threads a setup hook and cleanup hook are provided. ``` class ActiveSupport::TestCase parallelize_setup do |worker| # setup databases end parallelize_teardown do |worker| # cleanup database end parallelize(workers: 2) end ``` [Eileen M. Uchitelle, Aaron Patterson]
* | | | | | | | correct the dedup codeSam2018-02-151-3/+3
| | | | | | | |
* | | | | | | | Revert "Revert "Merge pull request #31999 from SamSaffron/patch-1""Rafael Mendonça França2018-02-151-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f282f3758d31e8445d0854e2ae7a67f17cede3bc.
* | | | | | | | Revert "Merge pull request #31999 from SamSaffron/patch-1"Rafael Mendonça França2018-02-151-11/+4
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9f65d2a08bc80a94bbb2c0b6e00957c7059aed25, reversing changes made to 966843732a607864b077b72b2a17168d4e3548cc. This broken a lot of tests.
* | | | | | | Merge pull request #32012 from utilum/mysql_min_versionRafael França2018-02-152-5/+5
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Bump mysql2 version
| * | | | | | | Bump mysql2 versionutilum2018-02-152-5/+5
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Skip 0.4.8 and 0.4.9, which had [Compilation failures against MariaDB Connector/C 3.0.2](https://github.com/brianmario/mysql2/releases/tag/0.4.10).
* | | | | | | Merge pull request #31999 from SamSaffron/patch-1Aaron Patterson2018-02-151-4/+11
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | PERF: dedupe scanned route fragments
| * | | | | | | PERF: dedupe scanned route fragmentsSam2018-02-151-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per: https://bugs.ruby-lang.org/issues/13077 String @- will dedupe strings. This takes advantage of this by deduping route fragments that are full of duplication usually. For Discourse: Before: Total allocated: 207574305 bytes (2214916 objects) Total retained: 36470010 bytes (322194 objects) After Total allocated: 207556847 bytes (2214711 objects) Total retained: 36327973 bytes (318627 objects) <- object that GC can not collect So we save 3500 or so RVALUES this way, not the largest saving in the world, but worth it especially for large route files.
* | | | | | | | Merge pull request #32003 from SamSaffron/patch-2Aaron Patterson2018-02-151-1/+1
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | PERF: symbolize ivar, to reduce dupes
| * | | | | | | PERF: symbolize ivar, to reduce dupesSam2018-02-151-1/+1
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed this in my memory profiler report. ``` 153 "@default_url_options" 152 /home/sam/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-5.1.4/lib/active_support/core_ext/class/attribute.rb:84 ``` 152 copies of the string `@default_url_options` are retained on the heap in Discourse post boot. Since this is just used for ivar lookups there is no need to use a string.
* | | | | | | Merge pull request #32001 from ydakuka/patch-2Arun Agrawal2018-02-151-18/+17
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Missing backquote, extra end keyword [ci skip]
| * | | | | | Missing backquote, extra end keyword [ci skip]Yauheni Dakuka2018-02-151-18/+17
|/ / / / / /
* | | | | | Add #create_or_find_by to lean on unique constraints (#31989)David Heinemeier Hansson2018-02-144-13/+78
| | | | | | | | | | | | | | | | | | Add #create_or_find_by to lean on unique constraints
* | | | | | Merge pull request #31995 from eugeneius/active_storage_require_dependencyRafael França2018-02-142-3/+9
|\ \ \ \ \ \ | | | | | | | | | | | | | | Use require_dependency inside Active Storage
| * | | | | | Use require_dependency inside Active StorageEugene Kenny2018-02-142-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Active Storage is an engine which means its models, jobs and controllers are autoloaded by Rails rather than Ruby. Unfortunately this means it's subject to the same gotchas as applications, including this one: http://guides.rubyonrails.org/v5.1.4/autoloading_and_reloading_constants.html#when-constants-aren-t-missed-qualified-references On Ruby < 2.5, constants nested under classes can't be autoloaded by Rails if a top level constant already exists with the same name. To avoid clashing with constants defined in users' applications or gems, we can use `require_dependency` to ensure that the nested constants are loaded before they're used.
* | | | | | | Merge pull request #31866 from fatkodima/redis_cache-connection_poolRafael Mendonça França2018-02-147-26/+99
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | Add support for connection pooling on RedisCacheStore
| * | | | | | Add support for connection pooling on RedisCacheStorefatkodima2018-02-017-25/+101
| | | | | | |
* | | | | | | Merge pull request #30941 from ↵Rafael França2018-02-1416-14/+454
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | toptal/introduce-custom-serializers-to-activejob-arguments Introduce custom serializers to ActiveJob arguments
| * | | | | | | Add CHANGELOG entryRafael Mendonça França2018-02-141-0/+3
| | | | | | | |
| * | | | | | | Add tests to serialize and deserialze individuallyRafael Mendonça França2018-02-141-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will make easier to be backwards compatible when changing the serialization implementation.
| * | | | | | | Simplify the implementation of custom argument serializersRafael Mendonça França2018-02-1413-281/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can speed up things for the supported types by keeping the code in the way it was. We can also avoid to loop trough all serializers in the deserialization by trying to access the class already in the Hash. We could also speed up the custom serialization if we define the class that is going to be serialized when registering the serializers, but that will remove the possibility of defining a serialzer for a superclass and have the subclass serialized using it.
| * | | | | | | Improve documentation on custom serializersRafael Mendonça França2018-02-144-79/+47
| | | | | | | |
| * | | | | | | Add configuration to set custom serializersRafael Mendonça França2018-02-142-0/+8
| | | | | | | |
| * | | | | | | No need to require a autoloaded constantRafael Mendonça França2018-02-141-1/+0
| | | | | | | |
| * | | | | | | Add serializers for Time, Date and DateTimeRafael Mendonça França2018-02-147-2/+77
| | | | | | | |
| * | | | | | | Allow serializers to be used either as classes or objectsRafael Mendonça França2018-02-1410-124/+110
| | | | | | | |
| * | | | | | | Add symbol and duration serializersRafael Mendonça França2018-02-144-2/+52
| | | | | | | |
| * | | | | | | Only add one more custom key in the serialized hashRafael Mendonça França2018-02-146-51/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now custom serialziers can register itself in the serialized hash using the "_aj_serialized" key that constains the serializer name. This way we can avoid poluting the hash with many reserved keys.
| * | | | | | | Define the interface of a SerializerRafael Mendonça França2018-02-141-0/+18
| | | | | | | |
| * | | | | | | Remove unnecessary qualified constant lookupsRafael Mendonça França2018-02-145-11/+11
| | | | | | | |
| * | | | | | | Simplify the implementation of custom serialziersRafael Mendonça França2018-02-143-41/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now it is only possible to define serializers globally so we don't need to use a class attribute in the job class.
| * | | | | | | Remove non-default serializersEvgenii Pecherkin2018-02-1410-163/+72
| | | | | | | |
| * | | | | | | Introduce serializers to ActiveJobEvgenii Pecherkin2018-02-1419-136/+602
| | | | | | | |
* | | | | | | | Merge pull request #31993 from tjschuck/rdoc_formatting_fixRafael França2018-02-141-1/+1
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Rdoc formatting fix: <b> instead of MD-style asterisks
| * | | | | | | Rdoc formatting fix: <b> instead of MD-style asterisksT.J. Schuck2018-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | Don't force people to upgrade i18n gemRafael Mendonça França2018-02-142-2/+2
|/ / / / / / /
* | | | | | | Update Gemfile.lockRafael Mendonça França2018-02-141-2/+2
| | | | | | |
* | | | | | | Merge pull request #31991 from radar/bump-i18n-to-one-dot-ohRafael França2018-02-141-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Bump i18n to 1.0
| * | | | | | | Bump i18n to 1.0Ryan Bigg2018-02-141-1/+1
| | | | | | | |
* | | | | | | | Document MuPDF version requirementGeorge Claghorn2018-02-131-1/+1
| | | | | | | |
* | | | | | | | Merge pull request #31978 from claudiob/don-t-overwrite-master-keyYuji Yaginuma2018-02-132-2/+5
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Don't overwrite config/master.key even on --force
| * | | | | | | | Don't overwrite config/master.key even on --forceclaudiob2018-02-122-2/+5
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/rails/rails/pull/31957#issuecomment-364817423 The purpose of `--force` is not to have any prompt whether a file should be kept or overwritten. In general, all existing files should be overwritten. However, `config/master.key` is special because it is git-ignored, and overwriting it will cause the app not to run (since there won't be a way to decrypt the credentials). As a result, it's probably better to keep the existing config/master.key.
* | | | | | | | Merge pull request #31970 from fatkodima/active_storage-unattached-scopeRafael França2018-02-122-0/+19
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add ActiveStorage::Blob.unattached scope
| * | | | | | | | Add ActiveStorage::Blob.unattached scopefatkodima2018-02-122-0/+19
| | | | | | | | |
* | | | | | | | | Do not update `load_defaults` version when running `app:update` (#31951)Yuji Yaginuma2018-02-134-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Incompatible settings are included in the settings set by `load_defaults`. So, I think that target version should be updated by a user when becomes available, and should not be updated with `app:update`.