Comments (9)
FileSystem-Git is the likely culprit, yes. Currently, each time an object is looked up, a new file stream is opened. There is some caching in place already, but it could be better or is not very helpful yet. The Squit browser could also do less when a reference has not changed, for example. Or generating the object list should not involve extracting the artifacts from the files, etc. There is a lot of work to do (or to save...), when there is time.
from squot.
I don't even get to see any instances, because of #33.
So currently, both statements return an empty collection in my image.
from squot.
Okay, so I can confirm that this is also the case on macOS. It is actually the root cause for #33, because on macOS Sierra the default limit for the number of open files per process appears to be 256. Raising the limit temporarily "fixes" #33 until the new limit is hit. After a few seconds, unfortunately, the number of open pack files already is larger than 10,000.
It'd be great if you could fix this next, as it makes Squot and even the entire image unusable...
from squot.
I can only guess at this point, but is it possible that the unpacker ends up in an endless recursion for some reason? unpackWithoutIndexFile
also looks a little weird. Why decrement count
when using timesRepeat:
?
StandardFileStream
has a finalize
method, maybe FSFileHandle
also needs one? (Tried this already, but nothing really changed).
It's very weird that this only happens with pack files...
from squot.
The image does not hanging there is no forking going on in FileSystem-Git so there should not be an endless recursion. The count temporary is doubly used as a "remaining" counter. Do not remember from the top of my head what it is used for (sitting in a car atm).
A missing close on garbage collection would explain why the OS handles remain open, but no open FSHandles exist. Don't know if I'll be able to find and fix the problem before my departure to Finland, though.
from squot.
Okay, so finalize
seems reasonable, but does not solve the problem. It seems that each pack file is opened multiple times without closing it. This is what it looks like in macOS' Activity Monitor:
9
/Users/fniephaus/code/Squot/.git/objects/pack/pack-880f8345f2b0117652489bd69ec4d3f5cc28b533.pack
10
/Users/fniephaus/code/Squot/.git/objects/pack/pack-9e1de978700c6d1a7f468a1c95c0b952f44db11b.pack
11
/Users/fniephaus/code/Squot/.git/objects/pack/pack-880f8345f2b0117652489bd69ec4d3f5cc28b533.pack
12
/Users/fniephaus/code/Squot/.git/objects/pack/pack-880f8345f2b0117652489bd69ec4d3f5cc28b533.pack
13
/Users/fniephaus/code/Squot/.git/objects/pack/pack-9e1de978700c6d1a7f468a1c95c0b952f44db11b.pack
14
/Users/fniephaus/code/Squot/.git/objects/pack/pack-880f8345f2b0117652489bd69ec4d3f5cc28b533.pack
15
/Users/fniephaus/code/Squot/.git/objects/pack/pack-880f8345f2b0117652489bd69ec4d3f5cc28b533.pack
...
from squot.
I think I solved it in 721bc9d. Implementing finalize
does not suffice, you have to add the object to a WeakRegistry to have it finalized. During my tests, all handles are properly closed now, please check.
from squot.
Thanks, I realized that I need a WeakRegistry
, but added it to FSHandle
, so that FSMemoryHandle
s are also closed when GCed. However, my version is still not working, but checking again with yours. Nonetheless, it looks like Squot/Squit does lots of (sometimes redundant) I/O operations. Not sure where caching would be useful...
from squot.
Sounds good! 😃 And even better: your version seems to be working just fine. Thanks!
from squot.
Related Issues (20)
- Key not found: objectClassName HOT 3
- Cannot add a package that consists only of extension methods without creating a class category for it
- .package confusion after setup HOT 1
- [Squeak 5.3] Installation asks for author initials HOT 4
- Allow to load author settings from ~/.gitconfig
- Removing a remote-tracking branch should ask whether to also delete it from the remote
- Cannot view a branch named "hooks" in the Git Browser
- Switching away from an empty branch errors HOT 3
- Git Browser cannot find my package to load/trick HOT 2
- Status indicators for branches in Git Browser HOT 4
- Remove FileList2 dependency
- Add instructions for citation HOT 3
- Redundant override of `PositionableStream>>#peek:`
- Dependency on old version of INIFile
- Squit: Highlight extension classes and methods in diff trees
- test
- Put the getting started text from the readme into a HelpBrowser page HOT 3
- Attempting to load Seaside fails HOT 2
- MessageNotUnderstood: UndefinedObject>>key from GitRefCache>>#allWithPrefix:ifAbsentPutAll: HOT 3
- Unpack git objects during pull in background? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from squot.