使用electron+Dexie.js在mac上运行很慢,在windows上运行流畅?

问题遇到的现象和发生背景

为什么使用electron+electron-vue+Dexie.js在mac上运行很慢(占用cpu90%,且很不稳定),在windows上运行流畅?
希望工友们给点建议
问题是一涉及到数据库操作,占用率直接就炸了

问题相关代码
--db.js
import Dexie from 'dexie';
export class User extends Dexie {
    static getInstance(name) {
        return new User(name)
    }
    constructor(name) {
        // run the super constructor Dexie(databaseName) to create the IndexedDB
        // database.
        super(name || `User`);
        this.version(1).stores({
            chatInRooms: 'roomIdAndId,roomId,topStatus,msgDoNotDisturb,avatar,resend,isFirst,lastReadMsgId,isOffLineMsg,logo,msg,msgCount,nikeName,name,msgType,sendTime,msgId,unReadNum',
            chatLocalMsg: 'msgId,roomIdAndId,isTips,isMine,msg,msgType,isRead,isResending,replyType,sendTime,photo,nikeName,redStatus',
        });

        this.open()
        this.chatInRooms = this.table('chatInRooms')
        this.chatLocalMsg = this.table('chatLocalMsg')
    }
}
import { User, realDBName } from "./db";
export default class chatLocalMsgDAO {
    static getInstance() {
        return new chatLocalMsgDAO();
    }
    getUserInstance() {
        let name = realDBName();
        return User.getInstance(name);
    }
    newInfo() {
        return this.getUserInstance().chatLocalMsg;
    }
    get(option = {}) {
        let order = option.order || "msgId";
        return this.newInfo()
            .orderBy(order)
            .reverse()
            .toArray();
    }
    add(item) {
        this.find(item.msgId).then((result) => {
            if (!result) {
                return this.newInfo().add({...item });
            } else {
                //return this.newInfo().update(item.msgId, { ...item });
            }
        })

    }
}

--使用

let getInstance = chatLocalMsgDAO.getInstance();
    getInstance.find(offLineData.msgId).then(result => {
        if (!result) {
            offLineData.roomId = zid
            offLineData.id = zid
            offLineData.roomIdAndId = setRoomIdsId(offLineData.roomId, offLineData.roomType)
            chatLocalMsgDAO.getInstance().add(offLineData);
            Bus.$emit("imgList", offLineData.roomIdAndId)
            getInstance
                .get()
                .then((result) => {})
                .catch((e) => {
                    console.log("err_or: ", e);
                });
        }
    })
运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果

cpu 占用率降低且文档