Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » Global Value Cache
Global Value Cache [message #54211] Thu, 11 June 2020 09:06 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, this feature development started when testing UWord with R PI4. When I has loaded some .jpg images into document, resizing these took ages, because jpg decompression is quite slow. So the idea was that decompressed image should be cached before resized, but the old caching mechanism favored reduced memory consumption. Which was sad given there was about 3GB RAM free during testing...

So it got me thinking that we maybe should react to the amount of free memory (however you define it) in the system while caching. First I started to develop a protocol that would communicate the information about available memory to all registered caches but then got better idea: Image is Value, so why not create single global cache of Values, adjusted to available system memory...

The result is https://www.ultimatepp.org/src$Core$ValueCache_en-us.html.

Image cache ("MakeImage") is now just client to this global value cache and its size is periodically adjusted (when running GUI) to the system current status...
Re: Global Value Cache [message #54229 is a reply to message #54211] Sat, 13 June 2020 10:42 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi Mirek,

Just updated to latest SVN. Tried rebuild all, but ended up with the following:

Linking...
Draw.lib(MakeCache.obj) : error LNK2019: unresolved external symbol "class Upp::LRUCache<class Upp::Value,class Upp::String> & __cdecl Upp::TheValueCache(void)" (?TheValueCache@Upp@@YAAEAV?$LRUCache@VValue@Upp@@VString@2@@1@XZ) referenced in 
    function "void __cdecl Upp::ValueCacheAdjustSize<class <lambda_2e35ad9d7fd5412418149da4b8e9862a> >(class <lambda_2e35ad9d7fd5412418149da4b8e9862a>)" (??$ValueCacheAdjustSize@V<lambda_2e35ad9d7fd5412418149da4b8e9862a>@@@Upp@@YAXV<lambda_2e
    35ad9d7fd5412418149da4b8e9862a>@@@Z)
Draw.lib(MakeCache.obj) : error LNK2019: unresolved external symbol "class Upp::Value __cdecl Upp::MakeValue(struct Upp::LRUCache<class Upp::Value,class Upp::String>::Maker &)" (?MakeValue@Upp@@YA?AVValue@1@AEAUMaker@?$LRUCache@VValue@Upp@@VS
    tring@2@@1@@Z) referenced in function "class Upp::Image __cdecl Upp::CachedRescale(class Upp::Image const &,struct Upp::Size_<int>,struct Upp::Rect_<int> const &,int)" (?CachedRescale@Upp@@YA?AVImage@1@AEBV21@U?$Size_@H@1@AEBU?$Rect_@H@1@
    H@Z)
Draw.lib(MakeCache.obj) : error LNK2019: unresolved external symbol "bool __cdecl Upp::IsValueCacheActive(void)" (?IsValueCacheActive@Upp@@YA_NXZ) referenced in function "void __cdecl Upp::SysImageRealized(class Upp::Image const &)" (?SysImag
    eRealized@Upp@@YAXAEBVImage@1@@Z)
Draw.lib(MakeCache.obj) : error LNK2019: unresolved external symbol "void __cdecl Upp::AdjustValueCache(void)" (?AdjustValueCache@Upp@@YAXXZ) referenced in function "void __cdecl Upp::SweepMkImageCache(void)" (?SweepMkImageCache@Upp@@YAXXZ)
Draw.lib(MakeCache.obj) : error LNK2019: unresolved external symbol "void __cdecl Upp::SetupValueCache(int,int,double)" (?SetupValueCache@Upp@@YAXHHN@Z) referenced in function "void __cdecl Upp::SetMakeImageCacheMax(int)" (?SetMakeImageCacheM
    ax@Upp@@YAXH@Z)
Draw.lib(MakeCache.obj) : error LNK2019: unresolved external symbol "class Upp::StaticMutex Upp::ValueCacheMutex" (?ValueCacheMutex@Upp@@3VStaticMutex@1@A) referenced in function "void __cdecl Upp::ValueCacheAdjustSize<class <lambda_2e35ad9d7
    fd5412418149da4b8e9862a> >(class <lambda_2e35ad9d7fd5412418149da4b8e9862a>)" (??$ValueCacheAdjustSize@V<lambda_2e35ad9d7fd5412418149da4b8e9862a>@@@Upp@@YAXV<lambda_2e35ad9d7fd5412418149da4b8e9862a>@@@Z)
C:\upp-svn\out\yyy\MSBT19x64.Gui.Protect\xxxx.exe : fatal error LNK1120: 6 unresolved externals

There were errors. (3:09.26)


Is this related to this new global value cahce?

Best regards,

Tom

EDIT: OK, thanks! It works again on Windows.

[Updated on: Sat, 13 June 2020 18:40]

Report message to a moderator

Re: Global Value Cache [message #54231 is a reply to message #54229] Sat, 13 June 2020 14:44 Go to previous messageGo to next message
coolman is currently offline  coolman
Messages: 114
Registered: April 2006
Location: Czech Republic
Experienced Member
Hi,

There is a problem in the Linux with the commit Core: ValueCache. The IDE mouse response (double click, ...) and scrolling of large files are very slow.

Linux Ubuntu 18.04, Ubuntu clang version 10.0.1-++20200610113309+38f995e4cb4-1~exp1~20200610093918.17 0
Target: x86_64-pc-linux-gnu
Thread model: posix

BR, Radek
Re: Global Value Cache [message #54235 is a reply to message #54231] Sat, 13 June 2020 19:14 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Should be now fixed.
Re: Global Value Cache [message #54243 is a reply to message #54235] Sun, 14 June 2020 04:28 Go to previous message
coolman is currently offline  coolman
Messages: 114
Registered: April 2006
Location: Czech Republic
Experienced Member
Hi,

IDE in Linux works OK now, thanks.

Radek
Previous Topic: Changes in hashing
Next Topic: Variadic templates helper functions
Goto Forum:
  


Current Time: Sat Apr 20 08:00:33 CEST 2024

Total time taken to generate the page: 0.03401 seconds