Performance improvements (#288)

Only include needed parts from lodash

Don't prefetch

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/288
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
This commit is contained in:
konrad 2020-11-02 20:47:31 +00:00
parent e4ae8078bc
commit 2af53b16b6
23 changed files with 37 additions and 34 deletions

View file

@ -38,7 +38,7 @@ export default {
},
components: {
multiselect: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "multiselect" */ 'vue-multiselect'),
component: import(/* webpackChunkName: "multiselect" */ 'vue-multiselect'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,

View file

@ -173,7 +173,7 @@ export default {
},
components: {
multiselect: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "multiselect" */ 'vue-multiselect'),
component: import(/* webpackChunkName: "multiselect" */ 'vue-multiselect'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,

View file

@ -199,7 +199,7 @@ export default {
PrioritySelect,
flatPickr,
editor: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "editor" */ '../../components/input/editor'),
component: import(/* webpackChunkName: "editor" */ '../../components/input/editor'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,

View file

@ -83,7 +83,7 @@ export default {
name: 'comments',
components: {
editor: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "editor" */ '../../input/editor'),
component: import(/* webpackChunkName: "editor" */ '../../input/editor'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,

View file

@ -36,7 +36,7 @@
</template>
<script>
import {differenceWith} from 'lodash'
import differenceWith from 'lodash/differenceWith'
import UserModel from '../../../models/user'
import ListUserService from '../../../services/listUsers'
@ -50,7 +50,7 @@ export default {
components: {
User,
multiselect: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "multiselect" */ 'vue-multiselect'),
component: import(/* webpackChunkName: "multiselect" */ 'vue-multiselect'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,

View file

@ -41,7 +41,7 @@
</template>
<script>
import {differenceWith} from 'lodash'
import differenceWith from 'lodash/differenceWith'
import LabelService from '../../../services/label'
import LabelModel from '../../../models/label'
@ -76,7 +76,7 @@ export default {
},
components: {
multiselect: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "multiselect" */ 'vue-multiselect'),
component: import(/* webpackChunkName: "multiselect" */ 'vue-multiselect'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,

View file

@ -46,7 +46,7 @@ export default {
},
components: {
multiselect: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "multiselect" */ 'vue-multiselect'),
component: import(/* webpackChunkName: "multiselect" */ 'vue-multiselect'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,

View file

@ -116,7 +116,7 @@ export default {
},
components: {
multiselect: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "multiselect" */ 'vue-multiselect'),
component: import(/* webpackChunkName: "multiselect" */ 'vue-multiselect'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,

View file

@ -1,4 +1,6 @@
import {defaults, isNil, omitBy} from 'lodash'
import defaults from 'lodash/defaults'
import isNil from 'lodash/isNil'
import omitBy from 'lodash/omitBy'
import {objectToCamelCase} from '@/helpers/case'
export default class AbstractModel {

View file

@ -1,5 +1,5 @@
import TeamShareBaseModel from './teamShareBase'
import {merge} from 'lodash'
import merge from 'lodash/merge'
export default class TeamListModel extends TeamShareBaseModel {
defaults() {

View file

@ -1,5 +1,5 @@
import UserModel from './user'
import {merge} from 'lodash'
import merge from 'lodash/merge'
export default class TeamMemberModel extends UserModel {
defaults() {

View file

@ -1,5 +1,5 @@
import TeamShareBaseModel from './teamShareBase'
import {merge} from 'lodash'
import merge from 'lodash/merge'
export default class TeamNamespaceModel extends TeamShareBaseModel {
defaults() {

View file

@ -1,5 +1,5 @@
import UserShareBaseModel from './userShareBase'
import {merge} from 'lodash'
import merge from 'lodash/merge'
// This class extends the user share model with a 'rights' parameter which is used in sharing
export default class UserListModel extends UserShareBaseModel {

View file

@ -1,5 +1,5 @@
import UserShareBaseModel from './userShareBase'
import {merge} from 'lodash'
import merge from 'lodash/merge'
// This class extends the user share model with a 'rights' parameter which is used in sharing
export default class UserNamespaceModel extends UserShareBaseModel {

View file

@ -31,58 +31,58 @@ import Table from '../views/list/views/Table'
import CreateSavedFilter from '@/views/filters/CreateSavedFilter'
const PasswordResetComponent = () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "user-settings" */'../views/user/PasswordReset'),
component: import(/* webpackChunkName: "user-settings" */'../views/user/PasswordReset'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,
})
const GetPasswordResetComponent = () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "user-settings" */'../views/user/RequestPasswordReset'),
component: import(/* webpackChunkName: "user-settings" */'../views/user/RequestPasswordReset'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,
})
const UserSettingsComponent = () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "user-settings" */'../views/user/Settings'),
component: import(/* webpackChunkName: "user-settings" */'../views/user/Settings'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,
})
// List Handling
const NewListComponent = () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "settings" */'../views/list/NewList'),
component: import(/* webpackChunkName: "settings" */'../views/list/NewList'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,
})
const EditListComponent = () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "settings" */'../views/list/EditListView'),
component: import(/* webpackChunkName: "settings" */'../views/list/EditListView'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,
})
// Namespace Handling
const NewNamespaceComponent = () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "settings" */'../views/namespaces/NewNamespace'),
component: import(/* webpackChunkName: "settings" */'../views/namespaces/NewNamespace'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,
})
const EditNamespaceComponent = () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "settings" */'../views/namespaces/EditNamespace'),
component: import(/* webpackChunkName: "settings" */'../views/namespaces/EditNamespace'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,
})
const EditTeamComponent = () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "settings" */'../views/teams/EditTeam'),
component: import(/* webpackChunkName: "settings" */'../views/teams/EditTeam'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,
})
const NewTeamComponent = () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "settings" */'../views/teams/NewTeam'),
component: import(/* webpackChunkName: "settings" */'../views/teams/NewTeam'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,

View file

@ -1,5 +1,6 @@
import axios from 'axios'
import {reduce, replace} from 'lodash'
import reduce from 'lodash/reduce'
import replace from 'lodash/replace'
import {objectToSnakeCase} from '@/helpers/case'
export default class AbstractService {

View file

@ -93,7 +93,7 @@ export default {
components: {
Filters,
editor: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "editor" */ '../../components/input/editor'),
component: import(/* webpackChunkName: "editor" */ '../../components/input/editor'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,

View file

@ -114,7 +114,7 @@ export default {
components: {
Filters,
editor: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "editor" */ '../../components/input/editor'),
component: import(/* webpackChunkName: "editor" */ '../../components/input/editor'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,

View file

@ -108,7 +108,7 @@ export default {
components: {
ColorPicker,
editor: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "editor" */ '../../components/input/editor'),
component: import(/* webpackChunkName: "editor" */ '../../components/input/editor'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,

View file

@ -198,7 +198,7 @@ export default {
LinkSharing,
manageSharing,
editor: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "editor" */ '../../components/input/editor'),
component: import(/* webpackChunkName: "editor" */ '../../components/input/editor'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,

View file

@ -132,7 +132,7 @@ export default {
Fancycheckbox,
manageSharing,
editor: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "editor" */ '../../components/input/editor'),
component: import(/* webpackChunkName: "editor" */ '../../components/input/editor'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,

View file

@ -414,7 +414,7 @@ export default {
Comments,
flatPickr,
editor: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "editor" */ '../../components/input/editor'),
component: import(/* webpackChunkName: "editor" */ '../../components/input/editor'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,

View file

@ -211,13 +211,13 @@ export default {
},
components: {
multiselect: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "multiselect" */ 'vue-multiselect'),
component: import(/* webpackChunkName: "multiselect" */ 'vue-multiselect'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,
}),
editor: () => ({
component: import(/* webpackPrefetch: true *//* webpackChunkName: "editor" */ '../../components/input/editor'),
component: import(/* webpackChunkName: "editor" */ '../../components/input/editor'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,