repository stringclasses 156 values | issue title stringlengths 1 1.01k ⌀ | labels stringclasses 8 values | body stringlengths 1 270k ⌀ |
|---|---|---|---|
lmaxexchangedisruptor | add javadocs to eventpoller and a related method | Documentation | documentation for eventpoller per 367 while update the changelog I notice that all the change be list under break change perhaps you would like to separate out the break change from the other you could use 3 category for break change deprecation and the rest |
lmaxexchangedisruptor | addgatingsequence handleeventswithworkerpool for kafka producer | Question | hi do I need to integrate addgatingsequence into the code when use handleeventswithworkerpool to consume kafka producer handler what if the kafka can t compete with the speed of disruptor how the message can be handle actually I be use this approach java collection pool getpool int poolsize pool size eventworkhandler eventworkhandler new eventworkhandler poolsize int count 0 for producer producer pool eventworkhandler count new eventworkhandler producer my topic count count disruptor handleeventswithworkerpool eventworkhandler disruptor start and my eventworkerhandler look like java public class eventworkhandler implement workhandler private producer producer private string topic private integer partition public eventworkhandler producer producer string kafkatopic int partition this producer producer this topic kafkatopic this partition partition override public void onevent string command throw exception producer send new producerrecord topic partition command what can you suggest for I to improve this code and be able to consume all message serve from the ringbuffer same case can be apply if we want to save to database thank |
lmaxexchangedisruptor | how to use disruptor on multi producer and multi consumer condition | Question | I can t find code example be it to change producertype single to producertype multi the other be same as one producer and multi consumer condition hope to get some guidance if use one producer and producertype multi the producer be thread safe |
lmaxexchangedisruptor | why be singleproducersequencer pad with byte | Question | since singleproducersequencer be mean to be use by only one thread there seem to be no contention between multi thread my understanding about false sharing be this only when multiple thread read or write multiple variable can false sharing happen so why be singleproducersequencer design with padding byte since it be to be use in single thread situation or rather my understanding about false sharing be not correct can anybody explain thank |
lmaxexchangedisruptor | fix 370 logg instance be lazily initialize | Enhancement | default java logger be no long initialize when custom exceptionhandler instance be provide this allow log framework to delegate to disruptor without risk deadlock implementation note this introduce a new public utility class exceptionhandler which expose a singleton exceptionhandler that can be lazily initialize this allow the handler to be centrally control and share between batcheventprocessor and exceptionhandlerwrapper the exceptionhandler instance be store in non volatile field so I opt to null check and produce the default singleton instead of attempt to initialize the field to some default just prior to initialization this way even unexpected concurrent initial access should not be able to produce different behavior if this patch be apply batcheventprocessor be performance sensitive so I opt to structure change in such a way that method size will not grow in case it s optimize by size for inline exception handling generally occur out of hot path so additional method call overhead should be negligible and the calling method size should be slightly low avoid the exceptionhandler object lookup bytecode as an aside the batcheventprocessor hot loop may benefit from a single final field read outside of the loop to avoid unnecessary indirection because xx trustfinalnonstaticfield still isn t the default jvm behavior |
lmaxexchangedisruptor | need a release a year ago | Question | log4j 2 have be try to modularize as jpm module for well over a year we have be stick because the disruptor hasn t have a release in 3 year let alone one that simply declare an automatic module name in the manifest I see you have recently introduce a module info java file but that do we no good it if isn t go to be release in the next few week at the very least can you please create a branch of 3 4 2 and add the automatic module name to the manifest and release that so we can move forward see 279 that be 13 month ago |
lmaxexchangedisruptor | retain eventpoller in disruptor core | Question | the eventpoller be very useful in certain case particularly where the consume thread have other responsibility at the same time for example a ui thread or a game thread some other user agree I would ask that eventpoller be keep inside the disruptor and not remove also unlike with the workerpool it be not as simple to recreate the functionality of the class otherwise whereas usage of workerpool can be change to use striped event handler moreover eventpoller be far less of a maintenance burden |
lmaxexchangedisruptor | supply some missing javadoc commentary | Documentation | work towards |
lmaxexchangedisruptor | miss javadoc | Documentation | I be look at tighten the checkstyle rule but have to comment out rule check for javadoc on publicly scope type method and variable the follow be a list of currently miss javadoc which we should get clean up for a 4 0 release ant checkstyle error home nick git project disruptor src main java com lmax disruptor batchstartaware java 8 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor dataprovider java 18 miss a javadoc comment javadoctype ant checkstyle error home nick git project disruptor src main java com lmax disruptor dataprovider java 20 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor eventpoller java 15 miss a javadoc comment javadoctype ant checkstyle error home nick git project disruptor src main java com lmax disruptor eventpoller java 17 9 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor eventpoller java 20 miss a javadoc comment javadoctype ant checkstyle error home nick git project disruptor src main java com lmax disruptor eventpoller java 22 9 miss a javadoc comment javadocvariable ant checkstyle error home nick git project disruptor src main java com lmax disruptor eventpoller java 22 21 miss a javadoc comment javadocvariable ant checkstyle error home nick git project disruptor src main java com lmax disruptor eventpoller java 22 29 miss a javadoc comment javadocvariable ant checkstyle error home nick git project disruptor src main java com lmax disruptor eventpoller java 25 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor eventpoller java 37 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor eventpoller java 77 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor eventpoller java 101 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor eventprocessor java 41 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor eventsequencer java 3 miss a javadoc comment javadoctype ant checkstyle error home nick git project disruptor src main java com lmax disruptor eventsink java 3 miss a javadoc comment javadoctype ant checkstyle error home nick git project disruptor src main java com lmax disruptor insufficientcapacityexception java 28 5 miss a javadoc comment javadocvariable ant checkstyle error home nick git project disruptor src main java com lmax disruptor litetimeoutblockingwaitstrategy java 18 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor phasedbackoffwaitstrategy java 33 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor ringbuffer java 118 5 miss a javadoc comment javadocvariable ant checkstyle error home nick git project disruptor src main java com lmax disruptor sequence java 3 miss a javadoc comment javadoctype ant checkstyle error home nick git project disruptor src main java com lmax disruptor sequencer java 93 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor sleepingwaitstrategy java 40 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor sleepingwaitstrategy java 45 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor sleepingwaitstrategy java 50 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor timeoutblockingwaitstrategy java 20 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor timeoutexception java 3 miss a javadoc comment javadoctype ant checkstyle error home nick git project disruptor src main java com lmax disruptor timeoutexception java 6 5 miss a javadoc comment javadocvariable ant checkstyle error home nick git project disruptor src main java com lmax disruptor timeouthandler java 3 miss a javadoc comment javadoctype ant checkstyle error home nick git project disruptor src main java com lmax disruptor timeouthandler java 5 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor dsl exceptionhandlerwrapper java 6 miss a javadoc comment javadoctype ant checkstyle error home nick git project disruptor src main java com lmax disruptor dsl exceptionhandlerwrapper java 10 5 miss a javadoc comment javadocmethod ant checkstyle error home nick git project disruptor src main java com lmax disruptor util daemonthreadfactory java 25 5 miss a javadoc comment javadocvariable ant checkstyle error home nick git project disruptor src main java com lmax disruptor util util java 145 5 miss a javadoc comment javadocmethod |
lmaxexchangedisruptor | add rewind batch feature to the batcheventprocessor | Enhancement | when process an event if an exception be throw that could be recoverable via outside influence throw a rewindableexception that will replay all the event in the current batch |
lmaxexchangedisruptor | ringbuffer ispublishe be inconsistently name and implement | Bug | see 203 we would like this method to work it perhaps should be rename to isavailable this make it work for the multiproducersequencer case but singleproducersequencer then lie to we if the ring buffer have wrap motivation want to add assert isavailable n inside ringbuffer get n potential implementation in singleproducersequencer check we re not ask for a wrap sequence |
lmaxexchangedisruptor | use platform log api in fatalexceptionhandler and ignoreexceptionhandler | Enhancement | change from java util log to the platform log api be preferable now that this library be target jdk 11 remove the dependency on java util log which some modular application may want to avoid both java util logging and system logger can be redirect to a log framework of choice however do so be far more clean straightforward and effective for system logger I would wager performant too give jul s creation of logrecord object by default the system logg api route to java util log so for the majority of user this will be a non break change and the behavior will be exactly the same it be list as a break change because fatalexceptionhandler s constructor take a logger have be remove it affect the highly unlikely setup where the user have implement the system log api to use a certain log framework but have not do the same for java util log this may coincidentally solve some initialization cycle in log4j between log4j core and log4j jul see that be not the main benefit of this change however |
lmaxexchangedisruptor | add method to check if disruptor have be start | Enhancement | I have a use case where I want to check if disruptor have already be start before call start |
lmaxexchangedisruptor | threadhint onspinwait in blockingwaitstrategy cause high cpu load sometimes | Duplicate | we use disruptor 3 4 2 and find sometimes the cpu load go very high and the jstack show that the thread be invoke threadhint onspinwait in blockingwaitstrategy now we implement a custom blockingwaitstrategy and remove this code |
lmaxexchangedisruptor | change multiproducersequencer to use varhandle instead of unsafe | Enhancement | as part of move towards jdk11 we should be remove use of sun misc unsafe multiproducersequencer be use unsafe to provide finer grain concurrency control around the availability array which we can replace with the new varhandle api while add a jmh benchmark to try and compare the varhandle version vs unsafe I also take the opportunity to update the doc on how to run benchmark on isolate cpu I also change gradle to use a plugin for jmh which let I build a single jar with all dependency build in this make shipping jmh jar to a test system easy when run the benchmark in isolate mode the jcstress test suggest that all concurrency promise from the unsafe version be still meet the jmh benchmark result show that the code run at the same speed so change be not overly conservative jmh benchmark result from a tuned system with isolate cpus use to pin benchmark thread cat proc cpuinfo grep model name uniq model name intel r xeon r cpu e5 2687w v4 3 00ghz benchmark mode cnt score error unit multiproducersequencerbenchmark sequenceunsafe thrpt 10 368 560 9 649 op we multiproducersequencerbenchmark sequenceunsafe read1 thrpt 10 180 491 4 150 op we multiproducersequencerbenchmark sequenceunsafe read2 thrpt 10 178 312 4 981 op we multiproducersequencerbenchmark sequenceunsafe setvalue1a thrpt 10 1 713 0 498 op we multiproducersequencerbenchmark sequenceunsafe setvalue1b thrpt 10 2 436 0 718 op we multiproducersequencerbenchmark sequenceunsafe setvalue2a thrpt 10 1 581 0 662 op we multiproducersequencerbenchmark sequenceunsafe setvalue2b thrpt 10 4 027 0 934 op we multiproducersequencerbenchmark statemultiproducersequencervarhandle thrpt 10 354 095 20 804 op we multiproducersequencerbenchmark statemultiproducersequencervarhandle read1 thrpt 10 171 216 9 782 op we multiproducersequencerbenchmark statemultiproducersequencervarhandle read2 thrpt 10 173 149 11 326 op we multiproducersequencerbenchmark statemultiproducersequencervarhandle setvalue1a thrpt 10 1 584 0 627 op we multiproducersequencerbenchmark statemultiproducersequencervarhandle setvalue1b thrpt 10 2 504 0 547 op we multiproducersequencerbenchmark statemultiproducersequencervarhandle setvalue2a thrpt 10 1 875 0 636 op we multiproducersequencerbenchmark statemultiproducersequencervarhandle setvalue2b thrpt 10 3 766 0 854 op we |
lmaxexchangedisruptor | question be disruptor termination safe | Question | if a disruptor be place into share memory for ipc can it be use in a way such that the system move forward even when a producer crashed be kill in between the 2 phase commit or a consumer crashed be kill and never update its position |
lmaxexchangedisruptor | remove use of sun misc unsafe | Enhancement | sun misc unsafe be deprecate and eventually go to be remove in future java version there be from java 9 onward new api s which should replace the functionality previously find in unsafe and this project should be use these for disruptor 4 0 we be aim for jdk11 support and up so remove reference to unsafe in favour of new api the disruptor still use sun misc unsafe in a three place x sequence 344 x multiproducersequencer 353 x ringbufferfield 392 x util 392 |
lmaxexchangedisruptor | change sequence to use varhandle instead of unsafe | Enhancement | as part of move towards jdk11 we should be remove use of sun misc unsafe one of the main use be sequence and we can replace use of unsafe with the new varhandle api the other use of unsafe be in the ringbuffer class I have not touch that as part of this change I think that require its own work and pr as its use of unsafe be slightly different for benchmarking and stress testing I create three variant sequenceunsafe sequence as it be in disruptor 3 4 2 sequenceunsafevarhandle a version use varhandle that be on the jdk9 branch sequenceunsafevarhandlebarrier we think we could improve upon the basic use of varhandle this be the variant I have pull in to the main module I run all variation through the same jcstress test I write for the sequence as it be before I touch it all test pass I have also run the jmh benchmark on my local machine no tuning so error fairly large get the follow result cat proc cpuinfo grep model name uniq model name intel r core tm i5 6600k cpu 3 50ghz jmh version 1 26 vm version jdk 11 0 8 openjdk 64 bit server vm 11 0 8 10 lts vm invoker home nick jdks corretto 11 0 8 bin java vm option xmx256 m xms256 m xx maxdirectmemorysize 1 g dfile encode utf 8 duser country gb duser language en duser variant benchmark mode cnt score error unit sequencebenchmark atomiclong thrpt 10 1627 474 346 149 op we sequencebenchmark sequenceunsafe thrpt 10 1670 924 375 118 op we sequencebenchmark sequencevarhandle thrpt 10 1384 866 211 633 op we sequencebenchmark sequencevarhandlebarri thrpt 10 1507 071 353 475 op we sequencebenchmark atomiclong incrementvalue2 thrpt 10 34 129 33 359 op we sequencebenchmark sequenceunsafe incrementvalue2 thrpt 10 41 021 17 756 op we sequencebenchmark sequencevarhandle incrementvalue2 thrpt 10 25 945 11 946 op we sequencebenchmark sequencevarhandlebarri incrementvalue2 thrpt 10 32 693 14 031 op we sequencebenchmark atomiclong read1 thrpt 10 63 318 34 628 op we sequencebenchmark sequenceunsafe read1 thrpt 10 78 373 31 684 op we sequencebenchmark sequencevarhandle read1 thrpt 10 17 110 4 096 op we sequencebenchmark sequencevarhandlebarri read1 thrpt 10 76 520 19 497 op we sequencebenchmark atomiclong read2 thrpt 10 112 175 116 361 op we sequencebenchmark sequenceunsafe read2 thrpt 10 179 929 68 037 op we sequencebenchmark sequencevarhandle read2 thrpt 10 21 812 9 321 op we sequencebenchmark sequencevarhandlebarri read2 thrpt 10 137 503 62 813 op we sequencebenchmark atomiclong setvalue1opaque thrpt 10 1390 576 255 523 op we sequencebenchmark sequenceunsafe setvalue1 thrpt 10 1335 698 349 912 op we sequencebenchmark sequencevarhandle setvalue1 thrpt 10 1287 291 217 978 op we sequencebenchmark sequencevarhandlebarri setvalue1 thrpt 10 1221 826 338 011 op we sequencebenchmark atomiclong setvalue1volatile thrpt 10 27 276 11 290 op we sequencebenchmark sequenceunsafe setvalue1volatile thrpt 10 35 903 11 146 op we sequencebenchmark sequencevarhandle setvalue1volatile thrpt 10 32 708 8 105 op we sequencebenchmark sequencevarhandlebarri setvalue1volatile thrpt 10 38 528 9 951 op we this appear to show that the sequencevarhandlebarri have equivilent result to the old sequenceunsafe method or at least well within error bound from my local run |
lmaxexchangedisruptor | tell gradle to use the junit platform runner | Bug | currently gradle be attempt to run the test suite use the junit 4 platform since everything be recently migrate to junit 5 none of the test be find this pr fix the problem |
lmaxexchangedisruptor | how to improve disruptor when there be many producer | Question | in my program it receive a http request and then produce an event to ringbuffer since there be 200 thread default in tomcat that be there be 200 producer each thread produce one event at a time then publish to ringbuffer in that case cpu usage be high how to solve this here be our possible solution use multi ringbuffer and hash thread ringbuffersize to decide which ringbuffer to publish an event any suggestion |
lmaxexchangedisruptor | make result directory first in the jmh task | Bug | fix 337 |
lmaxexchangedisruptor | can not run jmh via gradle from command line | Bug | when attempt a clean jmh run via gradle it throw an error about not be able to touch the report file in the gradle task for jmh we already have an attempt to make sure the directory be there but perhaps this isn t work groovy def resultfile file build report jmh result format resultfile parentfile mkdir after an attempt run there be no report directory under build gradlew clean jmh task jmh fail warn an illegal reflective access operation have occur warn illegal reflective access by org openjdk jmh util util file home nick gradle cache module 2 file 2 1 org openjdk jmh jmh core 1 26 3a60bc5f3b6204cc52139e4cb8967f4209e115e3 jmh core 1 26 jar to field java io printstream charout warning please consider report this to the maintainer of org openjdk jmh util util warning use illegal access warn to enable warning of further illegal reflective access operation warn all illegal access operation will be deny in a future release error org openjdk jmh runner runnerexception can not touch the result file home nick git project disruptor build report jmh result json at org openjdk jmh runner runner internalrun runner java 263 at org openjdk jmh runner runner run runner java 210 at org openjdk jmh main main main java 71 failure build fail with an exception what go wrong execution fail for task jmh process command usr lib jvm java 11 openjdk bin java finish with non zero exit value 1 try run with stacktrace option to get the stack trace run with info or debug option to get more log output run with scan to get full insight get more help at build fail in 3s 4 actionable task 4 execute |
lmaxexchangedisruptor | it s difficult to navigate through the different github page documentation page | Documentation | since move the documentation to asciidoc it s become more difficult to navigate between the various page the index adoc link to the disruptor adoc technical paper changelog adoc changelog and user guide index adoc user guide but none of these page have link to the other page or back to the main page there be a couple of way to address this the easy being to stick link between the page at the top of every document it s a bit of a rough solution but it should make thing a little well until a well structure for the page be ready |
lmaxexchangedisruptor | restore arrow to diagram | Documentation | fix 326 |
lmaxexchangedisruptor | be it possible to implement a resizing ring buffer | Enhancement | be it possible to implement a ring buffer that will resize when full to some maximum capacity for example perhaps I have a ring buffer that have a difficult to predict size or I simply don t want to be concern with the constant monitoring and tuning of its size I want the ring buffer to be as small as possible to minimize waste memory but I also can not afford block when it become full in this case I be willing to pay the expensive cost of resizing since it should happen relatively infrequently log n time for the lifetime of an application if we use a double strategy I would still like to declare a maximum capacity to define some sane upper bind to prevent infinite run away usage but I can set that maximum comfortably high say 100x what I expect the typical size to reach perhaps some type of heuristic could even be use to shrink a ring buffer to recover from rare burst |
lmaxexchangedisruptor | documentation be miss arrow from figure | Documentation | in the html version of the technical paper figure 2 5 appear to be miss the arrow present in the original pdf version image |
lmaxexchangedisruptor | restore disruptor 1 0 pdf | Documentation | many place on the internet link directly to this pdf and update all of those link seem like a bit of a faff it would be nice if in the future we could generate the pdf from the adoc as well but for now it s easy to just re introduce the original version |
lmaxexchangedisruptor | fix documentation not list build output | Documentation | add note about run jmh benchmark |
lmaxexchangedisruptor | small improvement to the new document generation process | Documentation | three small change 1 fix the latency histogram image on the main page 2 stop generate javadoc under doc since we don t need to commit this manually any more 3 replace the getting start link on the index with the user guide |
lmaxexchangedisruptor | replace old doc with live asciidoc tor documentation | Documentation | the current method of documentation markdown document a ms word document javadoc github wiki be quite cumbersome markdown be nice and simple but lack more advanced feature e g be able to include snippet of source code directly from their origin file have the javadoc commit under doc be just ask for it to be neglect the github wiki appear to have several old page e g and it be not clear at least to I whether these be still relevant give that we re now on v3 x the change in this pr will do the follow replace the markdown ms word github wiki documentation with a single unified version in asciidoc remove the static javadoc and instead generate this at build time ensure it be always up to date add a new ci action that will regenerate the gh page branch from the asciidoc javadoc each time it run example technical paper user guide some thing to consider the documentation either the original source or the version in this pr probably need to be review as there be entire section with no meaningful content e g design and implementation but that s outside of the scope of what I m try to achieve here should the living documentation be generate from master or from the late release should we have two version |
lmaxexchangedisruptor | change source and target version to java 11 | Enhancement | change source and target version to java 11 |
lmaxexchangedisruptor | put github page in master branch under doc folder | Documentation | the current gh page branch have fail ci in the past due to not have gradle or the project source this commit bring the content of the gh page branch in to the docs folder of master which can be set as the source of github page the theme have change since the old one be no long easily available this also set the javadoc destination directory to be under doc so re generate javadoc need no further action to be in the correct place for the github page link if this get merge we will also need to update setting to have this take effect test on my branch and all link appear to work |
lmaxexchangedisruptor | workprocessor can hang when halt before run | Bug | I notice an issue in the workprocessor state in the net disruptor codebase I suspect that this issue affect the java disruptor as well the workerpool start with processor a and b one of the processor thread a start run while the other one b be still wait to be schedule the run processor process the event the workerpool be stop workerpool halt invoke workprocessor halt on a and b so b be halt before it be start the processor thread for b get schedule the workprocessor run method set run to true and never exit the processor thread for b keep run forever this problem be highly unlikely to happen in a production use case but it can happen in the test that create very short live disruptor I think it should be fix nonetheless the problem can be manually reproduce by run the shouldprovideeventstoworkhandler test multiple time java public class issuet test public void workhandlerissue throw exception for int I 0 I 100 I disruptort t new disruptortest t setup t shouldprovideeventstoworkhandler t teardown I see two possible correction use multiple value for the run state idle halt run like in the batcheventprocessor wait for the processor to be effectively run in workerpool start I can implement the correction in a pull request if need I can also write a suitable unit test |
lmaxexchangedisruptor | seem timeoutblockingwaitstrategy not work | Documentation | maybe I misunderstand the timeoutblockingwaitstrategy mean I think timeoutblockingwaitstrategy will release the producer thread when the ringbuffer be full after wait for a time period e g 3 sec but now the behavior look producer be wait still when I debug the code I find the process be wait on below code multiproducersequencer which you already have an comment on todo do current cursor get next current n long wrappoint next buffersize long cachedgatingsequence gatingsequencecache get if wrappoint cachedgatingsequence cachedgatingsequence current long gatingsequence util getminimumsequence gatingsequence current if wrappoint gatingsequence locksupport parknanos 1 todo should we spin base on the wait strategy continue gatingsequencecache set gatingsequence else if cursor compareandset current next break while true so I be think be this code don t consider any waiting strategy we choose my intention be to not block producer thread even we can drop some message if the ringbuffer be full but we hope to let wait strategy to do so not to check ringbuffer size by ourselves and also need to maintain some timeout etc I be use jdk 11 docker image thank |
lmaxexchangedisruptor | how to add remove handler dynamically with disruptor 3 | Enhancement | I have the pattern whereby a number of event be produce by multiple thread I then need to transform these event and then dispatch they to a number of consumer the consumer need to be dynamically add and remove from the system at runtime I be think of use 2 ring buffer we would receive the event on the first ring buffer and have a single consumer which transform they and place the transform event on the second rind buffer we would then have a number of consumer on the second ring buffer that receive event I can t quite figure out how to dynamically add and remove consumer at run time I have try this java private final disruptor outgoingdisruptor new disruptor lockaction new ring buffer size daemonthreadfactory instance private final ringbuffer outgoingringbuffer private final sequencegroup outgoingsequencegroup new sequencegroup private final map outgoinglistenerswithprocessor new nonblockinghashmap this outgoingringbuffer outgoingdisruptor start public void registerlistener final lockeventlistener lockeventlistener final sequencebarrier barrier outgoingringbuffer newbarri final eventhandler handler event sequence endofbatch lockeventlistener accept event final batcheventprocessor processor new batcheventprocessor outgoingringbuffer barrier handler processor getsequence set barrier getcursor outgoingsequencegroup add processor getsequence processor getsequence set outgoingringbuffer getcursor outgoinglistenerswithprocessor put lockeventlistener processor processor run notify the listener that it be register lockeventlistener register public void deregisterlistener final lockeventlistener lockeventlistener final batcheventprocessor processor outgoinglistenerswithprocessor remove lockeventlistener processor halt outgoingsequencegroup remove processor getsequence notify the listener that it be deregistere lockeventlistener unregistere however when I call registerlistener at runtime it always block on processor run and never proceed from there what be I do wrong here |
lmaxexchangedisruptor | modularize disruptor jar | Enhancement | add a module info java file to the project in order to provide official support for java 9 without this user be unable to run jlink against dependent java code |
lmaxexchangedisruptor | disruptor handleeventswith cause an unchecked warning due to varargs on generic type | Enhancement | it be worth consider mark this method with the safevarargs annotation to avoid the warning or take a different approach |
lmaxexchangedisruptor | shutdown happen before the last event be completely consume | Bug | maybe I ve misunderstood the api but with below test code shutdown be print before end of all event be this the designate logic I ve expect shutdown to be do after the event be completely consume so that the process would not be interrupt when surround with try with resource java import com lmax disruptor import com lmax disruptor dsl disruptor import com lmax disruptor dsl producertype import com lmax disruptor util daemonthreadfactory public class test static class row public int flag 1 static eventfactory factory new eventfactory override public row newinstance return new row static class handler implement eventhandler int seq 0 public handler int seq this seq seq public void onevent row row long sequence boolean endofbatch throw exception if seq 3 row flag 0 system out println end of all event public static void main string args disruptor disruptor new disruptor factory 8 daemonthreadfactory instance producertype single new blockingwaitstrategy disruptor setdefaultexceptionhandler new fatalexceptionhandler disruptor handleeventswith new handler 1 then new handler 2 then new handler 3 final ringbuffer ringbuffer disruptor start long sequence ringbuffer next row row ringbuffer get sequence row flag 0 ringbuffer publish sequence disruptor shutdown system out println shutdown |
lmaxexchangedisruptor | cpu exhaustion in multiproducersequencer | Enhancement | incorrect use of locksupport be cause cpu exhaustion in multiproducersequencer this cause extreme performance degradation my jvm get stuck in the next int method this method park the thread for a single nanosecond and then retest the condition this be so fast that my cpu could only execute 3 instruction it be a 3ghz cpu before restart which be probably less than a single jvm byte code instruction my guess be that the jvm be actually repeatedly re execute this block of code cause all other thread to be starve of cpu the use of the java locksupport parknanos method which be what lmax disruptor be do be exactly what the documentation say not to do which say park serve as an optimization of a busy wait that do not waste as much time spin but must be pair with an unpark to be effective but lmax do not pair it with an unpark which be why it be not effective I encounter this issue whilst log with log4j on window with java 8 many thread be write into the sequencer but only one thread be read from it to write the log file the reading thread be starve of cpu whilst the writing thread spin madly wait for space in the buffer |
lmaxexchangedisruptor | it be possible to shutdown and restart a disruptor | Enhancement | I have be play around with disruptor I have define a process but I need to reuse the process that use the disruptor object so after do a disruptor shutdown would be great to be able to do an disruptor start but I get an exception java lang illegalstateexception disruptor start must only be call once at com lmax disruptor dsl disruptor checkonlystartedonce disruptor java 493 at com lmax disruptor dsl disruptor start disruptor java 296 at lt jotun abstractjotun init abstractjotun java 111 at lt jotun singlejotuntask run singlejotuntask java 103 at java util concurrent executors runnableadapter call executor java 511 at java util concurrent futuretask runandreset futuretask java 308 at java util concurrent scheduledthreadpoolexecutor scheduledfuturetask access 301 scheduledthreadpoolexecutor java 180 at java util concurrent scheduledthreadpoolexecutor scheduledfuturetask run scheduledthreadpoolexecutor java 294 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1142 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 617 at java lang thread run thread java 745 java lang illegalstateexception disruptor start must only be call once at com lmax disruptor dsl disruptor checkonlystartedonce disruptor java 493 at com lmax disruptor dsl disruptor start disruptor java 296 at lt jotun abstractjotun init abstractjotun java 111 at lt jotun singlejotuntask run singlejotuntask java 103 at java util concurrent executors runnableadapter call executor java 511 at java util concurrent futuretask runandreset futuretask java 308 at java util concurrent scheduledthreadpoolexecutor scheduledfuturetask access 301 scheduledthreadpoolexecutor java 180 at java util concurrent scheduledthreadpoolexecutor scheduledfuturetask run scheduledthreadpoolexecutor java 294 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1142 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 617 at java lang thread run thread java 745 |
lmaxexchangedisruptor | memory leak unless clear the event | Enhancement | I have a chain of eventhandler and workhandler try to save defferent part of the event into defferent database table it look like this java public void init executor executor executor newcachedthreadpool edpseventfactory factory new edpseventfactory disruptor new disruptor factory buffersize executor producertype single new sleepingwaitstrategy init workhandlerspool totalhandler systempropertie threadpoolsize processoriginalrecordhandler new processoriginalrecordhandler totalhandler array fill processoriginalrecordhandler new processoriginalrecordhandler disruptor handleeventswith savealerepor then saveevt savelocation then savereader thenhandleeventswithworkerpool processoriginalrecordhandler then saveoriginalrecord then savecachedrecord then new eventgchandl disruptor start producer new edpseventproducer disruptor getringbuffer public void publishevent inputstream reportsxml producer ondata xmlhelper convertxml2ecreport reportsxml then I have get a memory leak if I put another handler new eventgchandler at the end of the chain to clear the event by set every field to null then the applicaton work fine be it the right way to use disruptor or I miss something in my code thank |
lmaxexchangedisruptor | trypublishevent efficiency | Question | I have an application which use ringbuffer s trypublishevent api to pass datum and discard they if the buffer be full I look at the source public boolean trypublishevent eventtranslator translator try final long sequence sequencer trynext translateandpublish translator sequence return true catch insufficientcapacityexception e return false the sequencer will throw an insufficientcapacityexception when the ring be full the exception be catch and then return false it seem not so efficient to I when trypublishevent be trigger frequently in my application even though insufficientcapacityexception be already optimize by disable stacktrace be it possible to return a special sequence number for sequencer trynext e g 1 for indicate a full status of the ring buffer instead of throw exception |
lmaxexchangedisruptor | exceptionhandler isn t propagate by disruptor to exist workerpool after set | Enhancement | exceptionhandler set to disruptor after initialize workerpool will not be propagate to workerpool disruptor new disruptor event new ring size executor producertype single new blockingwaitstrategy disruptor handleexceptionswith new fatalexceptionhandler disruptor handleeventswith new handler handleeventswithworkerpool new anotherhandler new anotherhandler will fail with nullpointer exception in case of exception in anotherhandler exception handler in workerpool be null while on this code disruptor new disruptor event new ring size executor producertype single new blockingwaitstrategy disruptor handleeventswith new handler handleeventswithworkerpool new anotherhandler new anotherhandler disruptor handleexceptionswith new fatalexceptionhandler will handle exception correctly I think this code sample should lead to the same result and state |
lmaxexchangedisruptor | support clear the disruptor | Enhancement | have a single method call that can stop all of the consumer reset their sequence number to the cursor value of the ring buffer and restart they all this would only be available to user of the disruptor class which have a view of all of the consumer should not impact performance of current fast path and should race free |
lmaxexchangedisruptor | what be the correct way to add remove handler dynamically | Bug | hello I have the situation when I need dynamically add and remove handler my code look like the this java addhandler eventhandler handler sequencebarri barrier ringbuffer newbarri batcheventprocessor processor new batcheventprocessor ringbuffer barrier handler processor getsequence set barrier getcursor sequencegroup add batcheventprocessor getsequence processor getsequence set ringbuffer getcursor processor run removehandler batcheventprocessor processor processor halt sequencegroup remove processor getsequence be this a correct setup I m ask this because very rarely I m get the follow exception on handler removal java lang arrayindexoutofboundsexception 0 at com lmax disruptor sequencegroup remove sequencegroup java 116 at removehandler and I be not able to find the issue for now use disruptor 2 10 3 with java 1 7 3 on window 7 x64 thank in advance |
nostra13androiduniversalimageloader | incorrect max texture size | Bug | since lollipop the framework be no long create a opengl context that be valid for the app this change in the framework break current way imagesizeutil get the gl max texture size as it will always be 0 if no context exist a possible solution be present here |
nostra13androiduniversalimageloader | inpurgeable and ininputshareable cause file descriptor leak on kitkat | Bug | we have file descriptor leak in our app run on kitkat and find it be cause by bug in android framework this library trigger that bug by set inpurgeable and inpurgeable flag to true flag be set by builder of displayimageoption l225 getthumbnail will trigger this issue l215 |
nostra13androiduniversalimageloader | bitmapconfig value not respect when there be multiple download with same uri but different displayimageoption | Bug | trigger two load cache in memory and disk bitmapconfig rgb 565 displayimage uri view displayimageoption cache in disk bitmapconfig argb 8888 loadimage uri imageloadinglistener when both load be request the bitmap return in imageloadinglistener be rgb 565 I suppose this problem be because the second call would check in the memorycache if the image from the url be already available and return it |
nostra13androiduniversalimageloader | reattach progress listener to pende download | Bug | hello I have problem with progress listener my use case be I have gridview with imageview as child image can be quite large so I m display progress indicator on they progress indicator work perfectly well until you start scroll forward and backwards because gridview recycle scroll out imageview they lose assotiate progresslistener when they be visible again and image download from first display be still in progress new progresslistener be not attach how can I solve this issue |
nostra13androiduniversalimageloader | same url request use synchronous loading cancel each other | Bug | in our project if you send multiple request to uil to loadimagesync that share the same url the first one load and the other one get cancel also explain here by nostra I understand that you can use the recommend workaround if you be not use loadimagesync but this be not our case here uil cancels previous loadimage task for the same url the workaround we have to implement be to lock on our worker thread that call loadimagesync on the uris be request so all request get fulfil and no cancellation trigger to illustrate in pseudo code example our workaround request 1 on worker thread lock on the url then hit loadimagesync to or whatever and unlock after the bitmap be receive request 2 hit loadimagesync hit the same lock on the url as request 1 but wait for the lock to be release therefore avoid the internal cancellation would it not be easy if we could mark request to not cancel if they be duplicate url from loadimagesync |
nostra13androiduniversalimageloader | random crash with rejectedexecutionexception | Bug | my app randomly crash I couldn t find any step to reproduce the issue fyi I do invoke imageloader getinstance stop sometime how can I avoid this crash if stop be reason for this issue be there any way to stop without crash any info be appreciate java util concurrent rejectedexecutionexception task com nostra13 universalimageloader core loadanddisplayimagetask 421a2718 reject from java util concurrent threadpoolexecutor 420e4548 shut down pool size 3 active thread 3 queue task 0 complete task 5 at java util concurrent threadpoolexecutor abortpolicy rejectedexecution threadpoolexecutor java 2011 at java util concurrent threadpoolexecutor reject threadpoolexecutor java 793 at java util concurrent threadpoolexecutor execute threadpoolexecutor java 1339 at com nostra13 universalimageloader core imageloaderengine 1 run imageloaderengine java 78 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1112 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 587 at java lang thread run thread java 841 my configuration displayimageoption defaultoption new displayimageoption builder cacheinmemory true cacheondisk true showimageonloade r mipmap logo unknown resource or drawable showimageonfail r mipmap logo unknown build imageloaderconfiguration builder builder new imageloaderconfiguration builder this builder defaultdisplayimageoption defaultoption l writelog false imageloader getinstance init builder build do it on application start |
nostra13androiduniversalimageloader | can uil deal with the image in webview | Question | webview ia also a place that consume a lot of memory can uil do something with it |
nostra13androiduniversalimageloader | update of cache file | Question | do uil have ability to update re download file in cache base on etag for http https or base on file s size for file system I have check source and have not find nothing like this use case use lru cache update file on server side I have to be visible on the device |
nostra13androiduniversalimageloader | how to change the size of the picture | Question | the ratio be fix w h 4 3 imageview scaletype be center how can I change the size of the picture to adapt to a specify width |
nostra13androiduniversalimageloader | split displayer | Question | hi I need to display both round corner bitmap and fade in animation 617 something come to my mind I think it can split in two thing 1 displayer 2 animator I think can set the image drawable in displayer and animte the view in animator and the usage may be like java displayimageoption option new displayimageoption builder displayer new roundedbitmapdisplayer 10 animator new fadeinbitmapanimator 500 build consider a linkeddisplayer |
nostra13androiduniversalimageloader | could support download permission | Question | I my project the image save as byte on server and need cookie permission to download so could support those to set cookiestore |
nostra13androiduniversalimageloader | pauseonscroll only if not load from cache or memory | Question | I m pause the imageloader when scroll and resume when the scroll state be idle how can I configure the image loader in a way that it will not pause on scroll when its try to get the image from the memory or cache only pause when try to download the image be there a proper way to do that |
nostra13androiduniversalimageloader | the picture which name be chinese can not be display | Bug | the picture which name be chinese can not be display I fix it imageloader getinstance displayimage uri decode uri fromfile file tostre holder iv option null |
nostra13androiduniversalimageloader | help imagesize invalid | Question | my code bitmap msrc imageloader getinstance loadimagesync drawable src resource new imagesize 200 150 log I height msrc getheight but result height 225 why |
nostra13androiduniversalimageloader | add support for loading image in remoteviews and lock screen widget | Question | can you please add support for remoteview and lock screen widget so that we can load image for remoteview and lock screen use uil |
nostra13androiduniversalimageloader | problem with twoway view library | Bug | nostra13 lucasr hi folk I detect a conflict with the uil and this lib the loading be odd and the view lose direction just because of use the uil with picasso imageloader this do not occur the conflict be base on a lag that be in the image loading and scroll jump remove the smoothness need more information work on it the cat uil the picasso art picasso sample second sample |
nostra13androiduniversalimageloader | I have a question about how to get the original file name file extension name from disk cache | Question | I be try to implement share feature use the disk cache image be there a way that can use the disk cache of the original file name file extension name |
nostra13androiduniversalimageloader | manual load image | Question | can I manual load image when I hava call imageloader getinstance denynetworkdownload true |
nostra13androiduniversalimageloader | how to avoid to much garbage collection run android while use uil | Question | comment41182800 26252909 please see this link for more detail |
nostra13androiduniversalimageloader | crash in fifolimitedmemorycache indexoutofboundsexception | Bug | version 1 9 2 java lang indexoutofboundsexception at java util linkedlist remove linkedlist java 660 at java util collection synchronizedlist remove collection java 609 at com nostra13 universalimageloader cache memory impl fifolimitedmemorycache removenext fifolimitedmemorycache java 77 at com nostra13 universalimageloader cache memory limitedmemorycache put limitedmemorycache java 72 at com nostra13 universalimageloader cache memory impl fifolimitedmemorycache put fifolimitedmemorycache java 47 at com nostra13 universalimageloader cache memory impl fifolimitedmemorycache put fifolimitedmemorycache java 37 at com nostra13 universalimageloader core loadanddisplayimagetask run loadanddisplayimagetask java 151 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1112 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 587 at java lang thread run thread java 841 |
nostra13androiduniversalimageloader | strictmode explicit termination method close not call new | Bug | when load image from contact uri a resource be acquire at attached stack trace but never release see java io closeable for information on avoid resource leak java lang throwable explicit termination method close not call at dalvik system closeguard open closeguard java 184 at android os parcelfiledescriptor parcelfiledescriptor java 179 at android os parcelfiledescriptor 1 createfromparcel parcelfiledescriptor java 905 at android os parcelfiledescriptor 1 createfromparcel parcelfiledescriptor java 897 at android content re assetfiledescriptor assetfiledescriptor java 359 at android content re assetfiledescriptor 1 createfromparcel assetfiledescriptor java 372 at android content re assetfiledescriptor 1 createfromparcel assetfiledescriptor java 370 at android content contentproviderproxy opentypedassetfile contentprovidernative java 684 at android content contentresolver opentypedassetfiledescriptor contentresolver java 1066 at android content contentresolver openassetfiledescriptor contentresolver java 907 at android content contentresolver openinputstream contentresolver java 632 at com nostra13 universalimageloader core download baseimagedownloader getstreamfromcontent baseimagedownloader java 187 at com nostra13 universalimageloader core download baseimagedownloader getstream baseimagedownloader java 89 at com nostra13 universalimageloader core loadanddisplayimagetask downloadimage loadanddisplayimagetask java 290 at com nostra13 universalimageloader core loadanddisplayimagetask trycacheimageondisk loadanddisplayimagetask java 273 at com nostra13 universalimageloader core loadanddisplayimagetask tryloadbitmap loadanddisplayimagetask java 229 at com nostra13 universalimageloader core loadanddisplayimagetask run loadanddisplayimagetask java 135 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1112 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 587 at java lang thread run thread java 841 |
nostra13androiduniversalimageloader | httpurlconnection be open but never close | Bug | I think it be relate to the code design 09 07 23 26 54 969 25821 25830 dh newspaper e strictmode a resource be acquire at attached stack trace but never release see java io closeable for information on avoid resource leak java lang throwable explicit termination method end not call at dalvik system closeguard open closeguard java 184 at java util zip inflater inflater java 82 at java util zip gzipinputstream gzipinputstream java 96 at java util zip gzipinputstream gzipinputstream java 81 at com android okhttp internal http httpengine initcontentstream httpengine java 468 at com android okhttp internal http httpengine readresponse httpengine java 666 at com android okhttp internal http httpurlconnectionimpl execute httpurlconnectionimpl java 347 at com android okhttp internal http httpurlconnectionimpl getresponse httpurlconnectionimpl java 296 at com android okhttp internal http httpurlconnectionimpl getresponsecode httpurlconnectionimpl java 503 at com nostra13 universalimageloader core download baseimagedownloader getstreamfromnetwork baseimagedownloader java 114 at com nostra13 universalimageloader core download baseimagedownloader getstream baseimagedownloader java 85 at com nostra13 universalimageloader core loadanddisplayimagetask downloadimage loadanddisplayimagetask java 290 at com nostra13 universalimageloader core loadanddisplayimagetask trycacheimageondisk loadanddisplayimagetask java 273 at com nostra13 universalimageloader core loadanddisplayimagetask tryloadbitmap loadanddisplayimagetask java 229 at com nostra13 universalimageloader core loadanddisplayimagetask run loadanddisplayimagetask java 135 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1112 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 587 at java lang thread run thread java 841 checkout the follow code we can return the inputstream and still close the connection java public static inputstream getstreamfromurl string address string useragent icancellation cancellistener throw ioexception byte content downloadcontent address useragent cancellistener return content null null new bytearrayinputstream content public static byte downloadcontent string address string useragent icancellation cancellistener throw ioexception stopwatch sw stopwatch createstarte try httpurlconnection httpconnection okhttpclient open new url address httpconnection addrequestproperty user agent useragent int responsecode httpconnection getresponsecode if 200 responsecode responsecode 300 inputstream input httpconnection getinputstream bytearrayoutputstream baos null try download all the page to other inputstream baos new bytearrayoutputstream byte buffer new byte 1024 int len while len input read buffer 1 threadutil checkcancellation cancellistener download hc cancel sw elapse timeunit millisecond ms address baos write buffer 0 len baos flush byte content baos tobytearray baos close log v tag download hc end content length byte sw elapse timeunit millisecond ms address return content finally if input null input close if baos null baos close else throw new illegalstateexception fail to connect to address httpconnection getresponsemessage responsecode catch connectexception e log w tag download hc error sw elapse timeunit millisecond ms address e throw e if you donnot want to immediatly download the content like this I think that there should have other code pattern to properly close the connection |
nostra13androiduniversalimageloader | one delay image request block the other | Bug | may I ask how to solve this problem one image request which be delay will block the other I set threadpoolsize to 1 and simulate this situation use fiddler I find the delay image request would be retry 3 time during this period of time other image would not be show I kown I can set a big threadpoolsize but I wonder if there be another way say mark this image as a broken image to prevent load it again |
nostra13androiduniversalimageloader | video thumbnail in sdcard | Question | how to show an video thumbnail in sdcard it be possible |
nostra13androiduniversalimageloader | imagesize not match set width height 1px off | Bug | I m not sure if this be expect to happen input a square image 640x640px then load sync with imagesize 200x200 and get a 199x199 image set imagesize to 300x300 give a 300x300 image which be expect my usage be private void initializeimage bitmap b getbitmap imageuri 200 200 log d tag albertbitmap b getwidth b getheight imageview setimagebitmap b private bitmap getbitmap uri uri int width int height imageloader mimageloader app getuil displayimageoption option new displayimageoption builder imagescaletype imagescaletype exactly considerexifparam true cacheondisk true build imagesize resize image to a fitting maximum of width and height note that imagesize do not crop the image imagesize size new imagesize width height return mimageloader loadimagesync uri tostring size option log result d detailsactivity albertbitmap 199 199 I m use 1 9 2 |
nostra13androiduniversalimageloader | exif orientation bug | Bug | hello I m use uil 1 9 1 in my recent project I see that uil be now support exif orientation but I encounter issue when load photo from sd card in my application image be rotate by 90 degree but in android gallery everything be ok screen my application android gallery code imageloader getinstance displayimage file currentphotoabsolutepath imageview imageloaderoption gallery public static displayimageoption gallery new displayimageoption builder cacheinmemory true build accord to issuecomment 17120841 it should work because I m load local file the problem occur on samsung galaxy s cyanogenmod 11 xperia s lt26i android 4 1 2 |
nostra13androiduniversalimageloader | image flickering on notifydatasetchange | Bug | problem cause by this bug 1 image flicker 2 if you load image grid scroll down then scroll up image be reload again 3 first batch of image consume twice as much memory it look like there be a bug here java com nostra13 universalimageloader core imageloader 193 imagesize targetsize imagesizeutil definetargetsizeforview imageview configuration maximagewidthformemorycache configuration maximageheightformemorycache string memorycachekey memorycacheutil generatekey uri targetsize first time when view be not create it generate image cache key with screenwidth x screenheight and when view already create it generate a new image cache key viewwidth x viewheight since key be different both time image be consider different so it load the same image twice into memory so if we have a grid with 20 image we will get 1 cache with 40 image 2 grid flickering or image reload on scrolling it can be very easy reproduce with sample that come with uil 1 call notifydatasetchange one more time or 2 just scroll down then up if someone want a quick fix replace cache key generator with static uri java com nostra13 universalimageloader core imageloader 194 string memorycachekey uri memorycacheutil generatekey uri targetsize |
nostra13androiduniversalimageloader | be it possible to put a file in cache without load it | Question | I would like to fetch a list of image from a server to be available on cache for later use currently I use imageloader getinstance loadimage just recycle the result bitmap but obviously there be no need to actually load the image into memory be there a way to do so |
nostra13androiduniversalimageloader | image in cache be not update | Question | java public imageloaderconfiguration getconfig context context imageloaderconfiguration config new imageloaderconfiguration builder context threadpriority thread norm priority 2 threadpoolsize 3 diskcache new unlimiteddisccache function getcachedir build return config public displayimageoption getoption int re displayimageoption option new displayimageoption builder cacheondisk true showimageforemptyuri res showimageonfail re showimageonloade re cacheinmemory false bitmapconfig bitmap config rgb 565 build return option these be config and display I want if some image be update on server then it should be update on disk cache too on mobile please give I a solution |
nostra13androiduniversalimageloader | different image size for showimageforemptyuri | Question | how can I set different image size for showimageforemptyuri |
nostra13androiduniversalimageloader | onprogressupdate without disk cache | Question | how can I use the progress bar in onprogressupdate without use use disk cache |
nostra13androiduniversalimageloader | how to reduce quality of image while download | Question | I m a new learner in android I have to load 17 image from this page then display it into viewpager however image load very slow so I want to reduce the image quality and size for performance what should I do to improve the speed thank a bunch |
nostra13androiduniversalimageloader | check for image with specify url already in cache | Question | could you add method for sync check image availability in cache |
nostra13androiduniversalimageloader | can I load all the picture from a specfic folder | Question | my folder file in the sd I want to load all the image I try file sdcard instadownloader for the constant string array but it doesn t work can someone help I |
nostra13androiduniversalimageloader | handle concurrency | Question | however a listview specific behavior reveal a problem with our current implementation indeed for memory efficiency reason listview recycle the view that be display when the user scroll if one fling the list a give imageview object will be use many time each time it be display the imageview correctly trigger an image download task which will eventually change its image so where be the problem as with most parallel application the key issue be in the ordering in our case there s no guarantee that the download task will finish in the order in which they be start the result be that the image finally display in the list may come from a previous item which simply happen to have take long to download this be not an issue if the image you download be bind once and for all to give imageview but let s fix it for the common case where they be use in a list I want to know if android universal image loader consider this problem 3q |
nostra13androiduniversalimageloader | what be the fast config | Question | what be the fast display config |
nostra13androiduniversalimageloader | npe for loading contact photo from content | Bug | hello when I try to load contact photo from content I m get npe for the user who doesn t have any contact photo how can I resolve this issue actually it s work for the user who have photo info but get this exception for the rest of they d imageloader load image from network content com android contact contact 118 120x120 d imageloader start display image task content com android contact contact 118 120x120 e imageloader null java lang nullpointerexception at com nostra13 universalimageloader core decode baseimagedecoder resetstream baseimagedecoder java 173 at com nostra13 universalimageloader core decode baseimagedecoder decode baseimagedecoder java 77 at com nostra13 universalimageloader core loadanddisplayimagetask decodeimage loadanddisplayimagetask java 264 at com nostra13 universalimageloader core loadanddisplayimagetask tryloadbitmap loadanddisplayimagetask java 237 at com nostra13 universalimageloader core loadanddisplayimagetask run loadanddisplayimagetask java 135 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1112 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 587 at java lang thread run thread java 841 configuration java imageloaderconfiguration config new imageloaderconfiguration builder context memorycache new lrumemorycache 20 1024 1024 memorycachesize 20 1024 1024 memorycachesizepercentage 13 memorycacheextraoption thumbnailsize thumbnailsize defaultdisplayimageoption displayimageoption createsimple writedebuglog build imageloader getinstance init config displayimageoption dio new displayimageoption builder cacheinmemory true showimageonloade r drawable list photo bg showimageforemptyuri r drawable list photo bg showimageonfail r drawable list photo bg resetviewbeforeloade true bitmapconfig bitmap config rgb 565 build I face different exception while use the diskcache 08 19 10 21 24 419 32245 32365 com turkcell bip d imageloader cache image on disk content com android contact contact 340 120x120 08 19 10 21 24 569 32245 32365 com turkcell bip e imageloader null java lang nullpointerexception at com nostra13 universalimageloader util ioutil copystream ioutil java 67 at com nostra13 universalimageloader cache disc impl basedisccache save basedisccache java 109 at com nostra13 universalimageloader core loadanddisplayimagetask downloadimage loadanddisplayimagetask java 291 at com nostra13 universalimageloader core loadanddisplayimagetask trycacheimageondisk loadanddisplayimagetask java 273 at com nostra13 universalimageloader core loadanddisplayimagetask tryloadbitmap loadanddisplayimagetask java 229 at com nostra13 universalimageloader core loadanddisplayimagetask run loadanddisplayimagetask java 135 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1112 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 587 at java lang thread run thread java 841 |
nostra13androiduniversalimageloader | good day | Question | be their a function in cluster image if so then I do not read the doc well thank |
nostra13androiduniversalimageloader | libegl error after call loader displayimage item get position holder imageview option | Question | I notice another thread for the same issue close about 2 year ago can you inform if it should be solve by the uil user it seem terrible complicated or if it can be discard |
nostra13androiduniversalimageloader | how to catch exception | Question | hi I want to catch all the exception from image loader try imageloader getinstance displayimage url articleimage catch exception e log d myappp image loading erroe bug882 e e getmessage but this simply doesn t work I have a lot of 08 08 16 13 19 058 e imageloader 16373 java net sockettimeoutexception and other exception in logcat |
nostra13androiduniversalimageloader | memorycache diskcache | Question | imageloader memorycache true diskcache true true loadanddisplaytask sd sd bitmap view sd view sd |
nostra13androiduniversalimageloader | loading image progressively interlace | Question | hi I need to load jpeg progressively like the 369 and I find you have close the issue so do you have any idea to solve this thank |
nostra13androiduniversalimageloader | generarte event on url redirection | Question | hi I be try to find out when the url redirect and to what address there be an event onloadingcomplete how ever the url in there be the original and not the redirected be it possible to obtain the redirected url |
nostra13androiduniversalimageloader | image for notifycation | Question | please how can the imageloader be use to load image on an notification because the displayimage method take an imageview as parameter and in a widget we have to use remoteviews thank |
nostra13androiduniversalimageloader | recommend way to handle no network airplane mode situation | Question | if we know we re not on the network be there a graceful way to handle that I e automatically queue all download request until network be restore or do people just currently let the request fail thank |
nostra13androiduniversalimageloader | can pauseonscrolllistener support load more item | Question | dear nostra13 thank you for wonderful library but I have an issue when I set pauseonscrolllistener for listview I can t detect event when my listview end of list to load more element can you help I to resolve this issue thank in advanced |
nostra13androiduniversalimageloader | support of samba location | Question | hy nostra13 congratulation for your library it s awesome but be there a way to load an image from a computer on the same local network with the samba protocol good |
nostra13androiduniversalimageloader | how to check if imageuri be in cache | Question | it would be nice to have a function that check if an image imageuri already be store in cache |
nostra13androiduniversalimageloader | java lang nullpointerexception in storageutil getcachedirectory | Bug | hello I receive an error log from my user java java lang runtimeexception unable to create application my customapplication java lang nullpointerexception at android app activitythread handlebindapplication activitythread java 4584 at android app activitythread access 1600 activitythread java 161 at android app activitythread h handlemessage activitythread java 1325 at android os handler dispatchmessage handler java 102 at android os looper loop looper java 157 at android app activitythread main activitythread java 5356 at java lang reflect method invokenative native method at java lang reflect method invoke method java 515 at com android internal os zygoteinit methodandargscaller run zygoteinit java 1265 at com android internal os zygoteinit main zygoteinit java 1081 at dalvik system nativestart main native method cause by java lang nullpointerexception at android os environment getstoragestate environment java 715 at android os environment getexternalstoragestate environment java 690 at com nostra13 universalimageloader util getcachedirectory sourcefile 68 at my customapplication oncreate sourcefile 97 at android app instrumentation callapplicationoncreate instrumentation java 1025 at android app activitythread handlebindapplication activitythread java 4581 10 more device specification model sch i545 android 4 2 2 my line 97 java file cachedir storageutil getcachedirectory getapplicationcontext |
nostra13androiduniversalimageloader | bitmap too large to be upload into a texture 252x10150 max 4096x4096 | Bug | bitmap too large to be upload into a texture 252x10150 max 4096x4096 1 9 2 |
nostra13androiduniversalimageloader | how disable image cache for sd card image | Question | how disable image cache for sd card image |
nostra13androiduniversalimageloader | divide by zero in ioutil shouldstoploade | Bug | v1 9 1 06 13 10 33 52 020 8379 9531 com some app e imageloader divide by zero java lang arithmeticexception divide by zero at com nostra13 universalimageloader util ioutil shouldstoploading ioutil java 85 at com nostra13 universalimageloader util ioutil copystream ioutil java 71 at com nostra13 universalimageloader cache disc impl ext lrudisccache save lrudisccache java 146 at com nostra13 universalimageloader core loadanddisplayimagetask downloadimage loadanddisplayimagetask java 291 at com nostra13 universalimageloader core loadanddisplayimagetask trycacheimageondisk loadanddisplayimagetask java 273 at com nostra13 universalimageloader core loadanddisplayimagetask tryloadbitmap loadanddisplayimagetask java 229 at com nostra13 universalimageloader core loadanddisplayimagetask run loadanddisplayimagetask java 135 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1112 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 587 at java lang thread run thread java 841 boolean shouldcontinue listener onbytescopie current total if shouldcontinue this line total may be 0 if 100 current total continue loading percentage return true if load more than 75 then continue load anyway |
nostra13androiduniversalimageloader | nullpointerexception in lrudisccache get lrudisccache java 124 | Bug | hi I receive many crash report from crashlytic last week version uil 1 9 2 with lrudisccache device oppo u701 4 0 4 root stacktrace java lang nullpointerexception at com nostra13 universalimageloader cache disc impl ext lrudisccache get lrudisccache java 124 at com nostra13 universalimageloader core imageloaderengine 1 run imageloaderengine java 72 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1076 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 569 at java lang thread run thread java 856 |
nostra13androiduniversalimageloader | imageloadingprogresslistener s method get total 1 when use 3 g network to download image file from network | Question | uil version be 1 9 1 when use 3 g network to download image file from network imageloadingprogresslistener s method get total 1 so progress will show you error percentage java new imageloadingprogresslistener override public void onprogressupdate string imageuri view view int current int total int percent int 100 float current float total here when use 3 g network total 1 if total 0 percentlode settext percent else percentlode settext filesizeutil formetfilesize current |
nostra13androiduniversalimageloader | load image from mysql and convert to bitmap | Question | hi I be a beginner and want to load image from my mysql database that be a string encode from jpeg image and try this library but here this code be use the static array of image and I have all image in string which will convert to bitmap after load so I want to download the string one by one and then convert to bitmap and set to gridview so how can I use this library or another way to upload image to the srever thank |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.