diff options
Diffstat (limited to 'script/workspace/loading.lua')
-rw-r--r-- | script/workspace/loading.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/script/workspace/loading.lua b/script/workspace/loading.lua index 468e1908..9344949c 100644 --- a/script/workspace/loading.lua +++ b/script/workspace/loading.lua @@ -99,6 +99,7 @@ function mt:loadFile(uri, libraryUri) -- self._sets[#self._sets+1] = waker --end) files.setText(uri, content, false) + files.getState(uri) if not self._cache[uri] then files.addRef(uri) end @@ -147,9 +148,9 @@ function mt:loadFile(uri, libraryUri) end ---@async -function mt:loadAll() +function mt:loadAll(fileName) local startClock = os.clock() - log.info('Load files from disk:', self.scp:getName()) + log.info('Load files from disk:', fileName) while self.read < self.max do self:update() local loader = table.remove(self._stash) @@ -161,7 +162,7 @@ function mt:loadAll() end end local loadedClock = os.clock() - log.info(('Loaded files takes [%.3f] sec: %s'):format(loadedClock - startClock, self.scp:getName())) + log.info(('Loaded files takes [%.3f] sec: %s'):format(loadedClock - startClock, fileName)) self._bar:remove() self._bar = progress.create(self.scp.uri, lang.script('WORKSPACE_LOADING', self.scp.uri), 0) for i, set in ipairs(self._sets) do @@ -170,8 +171,8 @@ function mt:loadAll() self.read = i self:update() end - log.info(('Compile files takes [%.3f] sec: %s'):format(os.clock() - loadedClock, self.scp:getName())) - log.info('Loaded finish:', self.scp:getName()) + log.info(('Compile files takes [%.3f] sec: %s'):format(os.clock() - loadedClock, fileName)) + log.info('Loaded finish:', fileName) end function mt:remove() |