eclipse-equinox / p2

Eclipse Public License 2.0
15 stars 41 forks source link

Perform the mirror step in a batch #416

Closed laeubi closed 10 months ago

laeubi commented 10 months ago

Currently the Mirroring is performing each step independently this can lead to considerable slow down as for example the SimpleArtifactRepository performs a save on every adding of a descriptor.

This wraps the mirror step and update of properties into a batch operation to increase performance.

github-actions[bot] commented 10 months ago

Test Results

       9 files  ±0         9 suites  ±0   30m 32s :stopwatch: - 3m 53s 2 181 tests ±0  2 177 :heavy_check_mark: ±0    4 :zzz: ±0  0 :x: ±0  6 633 runs  ±0  6 622 :heavy_check_mark: ±0  11 :zzz: ±0  0 :x: ±0 

Results for commit e1849281. ± Comparison against base commit a795c7f4.

laeubi commented 10 months ago

@merks It seems that I can't find usages of Mirroring beside MirrorApplication but maybe Oomph is using that somewhere?

merks commented 10 months ago

It looks like Oomph only uses that in a test like:

      Mirroring mirror = new Mirroring(sourceRepository, targetRepository, true);
      mirror.setCompare(false);
      mirror.setTransport(transport);
      mirror.setArtifactKeys(keys.toArray(new IArtifactKey[keys.size()]));

      IStatus result = mirror.run(true, false);
      P2CorePlugin.INSTANCE.coreException(result);