[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Do not cache fileSize in SQFile (#224)

smalltalking notifications at github.com
Wed Mar 7 17:11:04 UTC 2018


If you have more than one reference to the same file from the image (e.g. the changes file), then the file size cache will prevent changes written by one reference to be noticed by another, so you have to reopen all other references to actualize their cached file size.  
These changes will make that unnecessary.   

I could only test the code on linux, but hopefully the MacOS/iOS and win32 implementations are correct too.  
The changes do not cover platforms Plan9 and RiscOS. That's up to someone who has access to and experience with them.  
There's room for optimization on platforms which support the fstat() function (the current implementation just seeks to the end of the file and then back to the original position).
You can view, comment on, or merge this pull request online at:

  https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/224

-- Commit Summary --

  * Do not cache fileSize in SQFile
  * Merge branch 'Cog' of https://github.com/smalltalking/opensmalltalk-vm into Cog
  * Removed further references to fileSize
  * Merge branch 'Cog' of https://github.com/OpenSmalltalk/opensmalltalk-vm into Cog

-- File Changes --

    M platforms/Cross/plugins/FilePlugin/FilePlugin.h (1)
    M platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c (45)
    M platforms/Mac OS/vm/sqMacNSPlugin.c (10)
    M platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c (4)

-- Patch Links --

https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/224.patch
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/224.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/224
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20180307/ea387c36/attachment.html>


More information about the Vm-dev mailing list