You've already forked pigallery2
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user