385 Commits (02d56da41407d7c1a19a9fc79fc3dbba06f08927)

Author SHA1 Message Date
Jordi Boggiano 0d92c8df63
Merge pull request #7480 from staabm/patch-3
Simplify Rule->getJob()
6 years ago
Markus Staab 05499099a0
Simplify Rule->getJob() 6 years ago
Markus Staab f7a1c34c92
Removed unused variables 6 years ago
Markus Staab 50565cb0c8 Use variable to call count() less often 6 years ago
Rob 68d468d683
Merge pull request #7450 from staabm/simpler-hash
Use a simpler hashing for the Rule2Literal case
6 years ago
Rob 1e9136f086
Merge pull request #7456 from staabm/simpler-equals
Specialize Rule2Literal->equals(Rule2Literal) for speedup
6 years ago
Rob 7079cdb70d
Merge pull request #7458 from staabm/patch-3
Define variable only when actually used
6 years ago
Rob b350c09c7e
Merge pull request #7457 from staabm/patch-2
Remove unnecessary abs() calls
6 years ago
Markus Staab 86d5de2965
Define variable only when actually used 6 years ago
Markus Staab 42516901f1
Removed another unnecessary abs() call 6 years ago
Markus Staab 0e16dbabde
Removed another unnecessary abs() call 6 years ago
Markus Staab e3a23f4ae6
Remove unnecessary abs() calls
Literal cannot be negative at this point
6 years ago
Markus Staab 7a4937bbcc Specialize Rule2Literal->equals(Rule2Literal) for speedup 6 years ago
Markus Staab 07383552b3
Temporary save the package-name into a variable
this reduces number of unnecessary function calls in the hot path of "composer update"
6 years ago
Markus Staab 0aa7ec2d2c Use a simpler hashing for the Rule2Literal case
this speeds up "composer update" by ~18%
6 years ago
Gabriel Caruso 7d9f8e2247
Improvements
Small improvements, such as remove unused imports, unecessaries casts, parentheses, etc.
6 years ago
Yanick Witschi d82bdc04ac Improved debugging output 6 years ago
Yanick Witschi 5435877bd9 Improve SAT resolving developer debug information 6 years ago
Jordi Boggiano dae3c5bc2d Merge branch '1.6' 7 years ago
Jordi Boggiano 766ed9555e Only show override description if there is one, refs #7011 7 years ago
Vic Metcalfe fa5a94143a Show reason for php version package mismatch due to config.platform 7 years ago
Jordi Boggiano ad8b44a4c8 Merge branch '1.6' 7 years ago
Jordi Boggiano 471b012e3a Fix problem report when requiring "ext-zend opcache", refs #2509 7 years ago
Gabriel Caruso 3d262bd637 Fixes from PHPStan level 0
More fixes from PHPStan level 0
7 years ago
Gabriel Caruso 32a409a3ee Clean elses 7 years ago
Jordi Boggiano 0b3bc4ccb9 Merge branch '1.5' 7 years ago
Nils Adermann f40f95b269 Add a note that a user could have forgotten to add a custom repo if package not found 7 years ago
Jordi Boggiano c0eb32669a Remove comment 7 years ago
Vladimir Reznichenko c8615358cb SCA with PHP Inspections (EA Extended) 7 years ago
Denis Brumann 2df1a69287 Improve IDE autocompletion
According to type 2nd constructor-argument `$reasonData` can either be a Link or a PackageInterface. IDEs like PhpStorm won't be able to provide autocompletion since both classes are from a different namespace.

In order to provide better autocompletion for `$reasonData` and by extension `$this->reasonData` the use statements should be included or the type hint should use the fully qualified class name.

For the same reason I added the docblock on the protected method `formatePackagesUnique()`.
7 years ago
Jordi Boggiano 122e422682 CS fixes 7 years ago
rubenrua 8fccbaa4a4 Improve memory usage resolving dependencies II
Optimize `rulesByHash` in `Composer\DependencyResolver\RuleSet` to only
use an array with the second element, event with very low probability.
7 years ago
rubenrua 4e1887a721 Improve memory usage resolving dependencies
It is known that composer update takes a lot of memory: #5915, #5902,

I am playing with a profiler (@blackfireio) to make a demo in my local
PHP meetup (@phpvigo) and I found out a way to use less memory. These
are my first tests:

* Private project using PHP 5.6:
  * Memory: from 1.31GB to 1.07GB
  * Wall Time: from 2min 8s to 1min 33s

* symfony-demo using PHP 7.1 in my old mac book:
  * Memory: from 667MB to 523MB
  * Wall Time: from  5min 29s to 5min 28s

Not use an array inside conflict rules is this improvement main idea:

```php
<?php
//Memory 38MB
gc_collect_cycles();
gc_disable();

class Rule
{
    public $literals;

    public function __construct(array $literals)
    {
        $this->literals = $literals;
    }
}

$rules = array();

$i = 0;
while ($i<80000){ //
    $i++;

    $array = array(-$i, $i);
    $rule = new Rule($array);
    $rules[] = $rule;
}
```

```php
<?php
//Memory 11.1MB
gc_collect_cycles();
gc_disable();

class Rule2Literals
{
    public $literal1;
    public $literal2;

    public function __construct($literal1, $literal2)
    {
        $this->literal1 = $literal1;
        $this->literal2 = $literal2;
    }
}

$rules = array();

$i = 0;
while ($i<80000){ //
    $i++;

    $rule = new ConflictRule(-$i, $i);
    $rules[] = $rule;
}
```

More info https://github.com/composer/composer/pull/6168
7 years ago
johnstevenson 379fb70ad9 Use random name for tmp ini and delete after use
Thanks to Patrick Rose for reporting this issue.
8 years ago
Nicolas Grekas daf84bea33 Enhance solver perf by removing count() 8 years ago
Yanick Witschi 7b5fe5c7d4 CS 8 years ago
Yanick Witschi a9e88a27b3 CS 8 years ago
Yanick Witschi 4a769a785c Reduce calls on Rule::getHash() 8 years ago
ReenExe 53fc30fe56 clear code 8 years ago
Lucas CHERIFI 7e34d9ab97 Typo fix ;-) 8 years ago
Jordi Boggiano feda2a283f Improve error reporting some more, fixes #4310 8 years ago
Jordi Boggiano 3b0a1c6f70 Run cs fixer and update config to latest master 8 years ago
Niels Keurentjes 818c3e707a Ton of phpDoc fixes. 8 years ago
Jordi Boggiano c74e6df65d Fix strings being passed to an int arg, fixes 7.1 build 8 years ago
Jordi Boggiano 623c0dcda7 Improve solver error reporting, fixes #5086, fixes #2575, fixes #2661 8 years ago
Niels Keurentjes 8e78ce9a43 Add extra logging before and after SAT solving 8 years ago
Nils Adermann 4af74b54e0 Ignore self references when anlaysing independent root requirements
When creating a transaction we try to identify all requirements that are
not themselves required by any other package. If a package references
itself this should not mark it as being required by another package.
8 years ago
Niels Keurentjes b059cbe37c Removed unused variables and includes, fixed functions being called with more arguments than declared. 8 years ago
Jordi Boggiano c9436438ff Add memoization to parseConstraints, saves some (6-7% here) RAM and marginal CPU time 8 years ago
Niels Keurentjes ebfceefca6 Removed long deprecated functions that were no longer referenced anywhere. 8 years ago