1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-12-03 23:00:25 +02:00

Multiples small tweaks to save on the server response size:

* Removing ids from DTO as it is not needed on the client side. ~4% saving
 * Removing orientation information from DB and server response. ~3% saving
 * removing altitude from GPS data and reducing GPS, exposure and fstop precision ~3%
 Altogether 10% saving expected.
 #437
This commit is contained in:
Patrik J. Braun
2022-03-25 21:51:42 +01:00
parent fa28a6c647
commit 47d864abe5
26 changed files with 32 additions and 67 deletions

View File

@@ -95,12 +95,12 @@ describe('MetadataLoader', () => {
});
// TODO: deprecated tests. We do not save orientation anymore.
describe('should read orientation', () => {
for (let i = 0; i <= 8; ++i) {
it('Landscape ' + i, async () => {
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/orientation/Landscape_' + i + '.jpg'));
const expected = require(path.join(__dirname, '/../../../assets/orientation/Landscape.json'));
expected.orientation = i;
delete data.fileSize;
delete data.creationDate;
expect(Utils.clone(data)).to.be.deep.equal(expected);
@@ -108,7 +108,6 @@ describe('MetadataLoader', () => {
it('Portrait ' + i, async () => {
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/orientation/Portrait_' + i + '.jpg'));
const expected = require(path.join(__dirname, '/../../../assets/orientation/Portrait.json'));
expected.orientation = i;
delete data.fileSize;
delete data.creationDate;
expect(Utils.clone(data)).to.be.deep.equal(expected);