magento2.3 – How can I reduce the Largest Contentful Paint overhead of Magento 2 cookie restriction mode?

Our Google Pagespeed Insights score is suffering due to Largest Contentful Paint when using the Magento 2.3.0 default cookie restriction mode popup. With cookie restriction mode enabled the LCP is showing at over 7 seconds for mobile, the score is close to 3 seconds with cookie restriction disabled (some further minor changes will get LCP below 3s, to the ‘good’ Pagespeed level).

Can anyone suggest how I can reduce the system overhead of the default cookie popup please? For example, can it be preloaded or loaded earlier in the page? Are there any 3rd party extensions which are known to perform much better than the default cookie popup? Would a Magento version upgrade (=> 2.4) help?

Hoping for good news. Thanks…

c# – Measuring async/await overhead

A while ago I read an article stating that overhead of an async/await call was around 50ms. More recently I read an article that it was around 5ms. I was having a discussion about whether we should standardize async operations for all DB access and decided to take a crack at measuring it myself. And I ended up adding the following methods to a controller:

private int profileIterations = 1000;
(HttpGet)
public long NonAsyncLoop()
{
    var timer = new System.Diagnostics.Stopwatch();
    timer.Start();
    for (int i = 0; i < profileIterations; i++)
    {
        Thread.Sleep(5);
    }
    timer.Stop();
    return timer.ElapsedMilliseconds;
}

(HttpGet)
public async Task<long> AsyncLoop()
{
    var timer = new System.Diagnostics.Stopwatch();
    timer.Start();
    for (int i = 0; i < profileIterations; i++)
    {
        await Task.Delay(5);
    }
    timer.Stop();
    return timer.ElapsedMilliseconds;
}

This test returns surprisingly regular results indicating that the overhead of calling await Task.Delay() vs Thread.Sleep() is ~1/3 of a ms. Does anyone have any other easy test that could indicate the overhead? Because below 10ms of overhead it becomes a no-brainer to standardize async operations for all DB access.

Edit, adding reasoning
The other devs and I are deciding about whether to just use async for all DB operations going forward, the app we’re working with has all synchronous DB IO, so there is a possibility we may be converting large amounts of existing access when the opportunity arises.

To get an idea of DB latency I’m looking at app insights request profiles and looking at items listed under “SQL (Azure Database) Activities”. Most of these “activities” show wait times of between 1 and 5ms. So if my test is roughly accurate, then using async/await for all DB access is clearly the way to go moving forward, and existing synchronous access should be converted whenever practical. However, if overhead is in the 5-50ms range, then using async would actually decrease thread availability while making response time slower simultaneously.

wi fi – WMM causing a 100ms latency overhead on Android device

So the issue is that I have a Samsung M01 (Android 10) which is having a 100ms overhead latency.

Basically pinging the router gives me a average of 110ms of latency.

So after going around tweaking many settings I finally isolated the problem to the WMM setting.
The lag only happens when WMM is enabled so disabling it fixes the problem.
The problem with disabling WMM is that after that my router only goes at a extremely slow 14Mbps
(https://superuser.com/questions/1625684/disabling-wmm-causes-wi-fi-speeds-to-drop-to-14mbps)(1)

Also another thing I noticed is that this latency overhead only happens when I am connected to a mobile tower (tested by enabling airplane mode )

The latency was monitored while I was playing a game, Downloading some files on a Wi-Fi call and it doesn’t go below 100ms. But there are some random times when it starts behaving properly and gives me a latency of 2 to 5ms

Note : The ping monitoring was done by pinging in the local network.
This problem only occurs on my Samsung android device (It also occurs on another Samsung device (Samsung On7 Pro Android 5) but not on the Lenovo device I own). This doesn’t occur on any PC/Laptops I have access to.

So does anyone have any suggestion on how to fix this issue?
Thanks in advance.

database design – The overhead of OCC validation phase

The validation phase of optimistic concurrency control has two derctions: one is backward validation, checking for conflicts with any previously validated transaction, the other is forward validation, checking for conflicts with transaction that not yet committed.

The validated transactions install modifications into “global” database, which means the main work backward validation needs to do is checking conflicts with “global” database. However, the forward validation needs to check conflicts with each running transaction. It introduces expensive communication between threads if the database supports multithreading, and also extensive memory read when the concurrency level of transaction is pretty high.

As far as I know, forword validation is more widely adopted than backward validation. Why? Which cases are suited for forward validation and backward validation respectively?

postgresql – How do I measure the overhead of a Postgres extended statistics object?

Some solutions to poor query performance suggest creating extended statistics objects to help the query planner better understand the shape of the data. Because these statistics objects are not created by default, I assume that they have some non-neglible overhead.

What kinds of overhead are present, what statistics object parameters factor in to the overhead, and can I quantitatively measure what the overhead of a specific statistics object is?

Some possible kinds of overhead I’ve thought of:

  • Increased CPU usage
    • when inserting
    • when querying
    • when analyzing
  • Increased memory usage
  • Increased disk usage

canon – Is there some overhead to Write speeds of an SD Card?

I just bought an EOS R, and when recording 4k in all-i mode (8-bit LOG), it usually shuts down after 30 seconds or so (giving me an error, shaming me over my slow sd card).

I know, though, that it records at 480 mb/s or 60MB/s, and my card goes “up to” 150 MB/s. After testing, I can see the the WRITE speeds of the card are consistently bove 75MB/s (around 80 usually).

That’s why the question: is there some overhead to the 60MB? Am I too close to the limit for the camera to function normally? Will I be safe if I can get a card with write speeds closer to the limit of 100MB/s of UHS-i? Or will I have to get a UHS-ii card?

finite automata – Overhead cost of spawning child processes

I am curious as to the overhead cost of spawning child processes using fork in a Linux environment. Suppose I have a C program such as

void run_computation(int x);

int main() {
    for (int k=0; k<10; k++) {
        if ( fork() == 0 ) {
            run_computation(k);
            break;
        }
    }

    return 0;
}

Assuming that no global state is modified by run_computation, how efficient in terms of overhead is the setting up of the child processes?

To help understand where I’m coming from, I’d like to write my own regex engine (for self-learning) and am imagining using fork to implement the NFA. So, am I incurring an unreasonable cost in such an implementation compared to other methods?

mysql – Java EE – Memory overhead, secondary threads that do not close (Daemon Thread [HikariPool-10 housekeeper] (Running)

My problem: my application consumes all the memory of the server and crashes Tomcat.

I use Eclipse, JSF, MySQL, Hibernate, HikariCP.

Whenever I open a database connection thread, it closes normally, but a second thread is left open forever, which results in memory overhead and Tomcat crashes (Caused by: java .lang.OutOfMemoryError: GC overhead limit exceeded), has anyone experienced this?

The problem is that I realized that Hikari keeps threads running even after consulting the bank, even after the session ends. It's overwhelming my request.

If someone knows how to close them, thank you, or manage to understand the cause of not being finalized, after having closed the main connection with the bank, in any case I appreciate any idea.

Example of open secondary threads (the main Bank connection threads close normally), if I open a screen 10 times, 10 secondary threads will remain in memory, I cannot resolve this memory leak, because I don't ; have no control over these threads.

Demon Thread (HikariPool-1 Maid) (running)
Demon thread (cleaning lady HikariPool-2) (running)
Demon Thread (HikariPool-3 Maid) (running)
Demon thread (cleaning lady HikariPool-4) (running)
Demon thread (cleaning lady HikariPool-5) (running)
Demon thread (cleaning lady HikariPool-6) (running)
Demon thread (cleaning lady HikariPool-7) (running)
Demon thread (cleaning lady HikariPool-8) (running)
Demon thread (cleaning lady HikariPool-9) (running)
Demon Thread (housekeeper HikariPool-10) (Running)

As I do:

pom.xml:

        4.0.0
        br.com.projeto
        testbeds
        war
        0.0.1-SNAPSHOT
        testbeds

        
            UTF-8
        

        
            
            
                org.omnifaces
                omnifaces
                3.3
            

            
            
                org.primefaces
                primefaces
                7.0
            

            
            
                org.jboss.weld.servlet
                weld-servlet
                2.4.8.Final
            

            
            
                org.jboss
                jandex
                2.1.1.Final
            

            
            
                org.hibernate
                hibernate-core
                5.4.6.Final
            


            

            
            
                com.mchange
                c3p0
                0.9.5.4
            


            
            
                org.hibernate.common
                hibernate-commons-annotations
                5.1.0.Final
            



            
            
                org.hibernate
                hibernate-entitymanager
                5.4.6.Final
            


            
            
                mysql
                mysql-connector-java
                8.0.16
            

            
            
                org.glassfish
                javax.faces
                2.4.0
            

            
            
                javax.servlet
                javax.servlet-api
                4.0.1
                provided
            

            
            
                com.sun.faces
                jsf-api
                2.2.13
            


            
            
                javax
                javaee-api
                7.0
                provided
            

            
                net.bootsfaces
                bootsfaces
                1.4.1
                compile
            

            
                junit
                junit
                3.8.1
                test
            

            
            
                org.json
                json
                20180813
            

            
            
                org.hibernate.validator
                hibernate-validator
                6.1.0.Alpha5
            

            
                org.ocpsoft.rewrite
                rewrite-servlet
                3.4.1.Final
            
            
                org.ocpsoft.rewrite
                rewrite-config-prettyfaces
                3.4.1.Final
            

            
            
                javax.servlet
                jstl
                1.2
            

            
            
                org.apache.poi
                poi
                4.1.0
            

            
            
                net.sourceforge.barbecue
                barbecue
                1.5-beta1
            

            
            
                net.sf.jasperreports
                jasperreports
                6.9.0
            

            
            
                net.sf.jasperreports
                jasperreports-fonts
                6.9.0
            

            
            
                xerces
                xercesImpl
                2.12.0
            

            
            
            
                org.slf4j
                slf4j-log4j12
                1.6.1
            

            
            
                org.hsqldb
                hsqldb
                2.5.0
                test
            

            
            
                commons-fileupload
                commons-fileupload
                1.4
            

            
                commons-io
                commons-io
                2.6
            

            
            
                joda-time
                joda-time
                2.10.4
            

            
            
                commons-validator
                commons-validator
                1.6
            

    

            
            
                org.hibernate
                hibernate-hikaricp
                5.4.10.Final
            


        

        
            testbeds
            
                
                    org.apache.maven.plugins
                    maven-compiler-plugin
                    3.8.0
                    
                        1.8
                        1.8
                    
                
            
        
    

My Persistence.xml:

    


    br.com.projeto.testbeds.persistence.entities.Curso
    br.com.projeto.testbeds.persistence.entities.Edital
    br.com.projeto.testbeds.persistence.entities.AlunoInscricao
    br.com.projeto.testbeds.persistence.entities.Disciplina
    br.com.projeto.testbeds.persistence.entities.Usuario
    br.com.projeto.testbeds.persistence.entities.Projeto
    br.com.projeto.testbeds.persistence.entities.ProjetoAluno
    br.com.projeto.testbeds.persistence.entities.Campus
    br.com.projeto.testbeds.persistence.entities.Mensagem
    br.com.projeto.testbeds.persistence.entities.MensagemAnexo
    br.com.projeto.testbeds.persistence.entities.Pendencia
    br.com.projeto.testbeds.persistence.entities.AcaoUsuario
    br.com.projeto.testbeds.persistence.entities.Emprego
    br.com.projeto.testbeds.persistence.entities.Acesso

    

        
        
        
        
        
        
        

        
        

        
        

        
        


        
        
        
        
        

        


    
        ` Classe EntityManagerProducer: ` import javax.enterprise.context.RequestScoped; import javax.enterprise.inject.Disposes; import javax.enterprise.inject.Produces; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence;
    public class EntityManagerProducer {

    private EntityManagerFactory factory;

    public EntityManagerProducer() {
        this.factory = Persistence.createEntityManagerFactory("testbedsPU");
    }

    @Produces
    @RequestScoped
    public EntityManager createEntityManager() {
        System.out.println("criar1");
        return factory.createEntityManager();

    }

    public void closeEntityManager(@Disposes EntityManager manager) {
        manager.close();
        this.factory.close();
    }
    }

My DAOFactory:


    import java.lang.reflect.ParameterizedType;

    import javax.enterprise.context.Dependent;
    import javax.enterprise.inject.Produces;
    import javax.enterprise.inject.spi.InjectionPoint;
    import javax.inject.Inject;
    import javax.persistence.EntityManager;

    import br.com.projeto.testbeds.persistence.DAOInterfaces.DAO;

    public class DAOFactory {

    @Inject
    private EntityManager em;

    @SuppressWarnings({ "rawtypes", "unchecked" })
    @Produces
    @Dependent
    public  DAO createDAO(InjectionPoint point) {
        ParameterizedType type = (ParameterizedType) point.getType();
        Class classe = (Class) type.getActualTypeArguments()(0);
        return new DAOImpl(classe, em);
    }
    }

My DaoImpl:


    import java.io.Serializable;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;

    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import javax.persistence.Query;
    import javax.persistence.TypedQuery;

    import br.com.projeto.testbeds.persistence.DAOInterfaces.DAO;
    import br.com.projeto.testbeds.persistence.fileservice.FileXMLService;

    public class DAOImpl implements DAO {

    /**
     * 
     */
    private static final long serialVersionUID = 422152908443386672L;

    private EntityManager em;

    private final Class classe;

    private static final FileXMLService hqlQuery;

    static {
        hqlQuery = new FileXMLService("hql.xml");
    }

    public DAOImpl(Class classe, EntityManager em) {
        this.classe = classe;
        this.em = em;
    }

    @Override
    public T save(T entity) {
        em.persist(entity);
        em.flush();
        return entity;
    }

    @Override
    public T update(T entity) {
        entity = em.merge(entity);
        em.flush();
        return entity;
    }

    @Override
    public List getAll() {
        String hql = "Select e from " + this.classe.getSimpleName() + " e";
        TypedQuery query = em.createQuery(hql, this.classe);
        return query.getResultList();
    }

    @Override
    public List findByHQLQuery(String queryId, int maxResults) {
        String hql = hqlQuery.findValue(queryId);
        TypedQuery query = em.createQuery(hql, this.classe);
        return maxResults == 0 ? query.getResultList() : query.setMaxResults(maxResults).getResultList();

    }

    @Override
    public List findByHQLQuery(String queryId, List value, int maxResults) {
        String hql = hqlQuery.findValue(queryId);
        Pattern pattern = Pattern.compile("(:\w+)");
        Matcher matcher = pattern.matcher(hql);
        List params = new ArrayList<>();
        while (matcher.find()) {
            params.add(matcher.group().replace(":", ""));
        }
        // System.out.println();
        // System.out.print(hql);
        TypedQuery query = em.createQuery(hql, this.classe);
        for (int i = 0; i < params.size(); i++) {
            // System.out.println(params.get(i) + " - " + value.get(i));
            query.setParameter(params.get(i), value.get(i));
        }
        // System.out.println();
        // System.out.println();

        return maxResults == 0 ? query.getResultList() : query.setMaxResults(maxResults).getResultList();
        //System.out.println("a13");
        // return null;
    }

    // para aqueles que gosta de anotar as querie na model
    @Override
    public List findByHQLNamedQuery(String queryNamed, int maxResults) {
        String hql = queryNamed;
        TypedQuery query = em.createNamedQuery(hql, this.classe);
        return maxResults == 0 ? query.getResultList() : query.setMaxResults(maxResults).getResultList();

    }

    @Override
    public List findByHQLNamedQuery(String queryNamed, List value, int maxResults) {
        String hql = queryNamed;
        Pattern pattern = Pattern.compile("(:\w+)");
        Matcher matcher = pattern.matcher(hql);
        List params = new ArrayList<>();
        while (matcher.find()) {
            params.add(matcher.group().replace(":", ""));
        }
        // System.out.println();
        // System.out.print(hql);
        TypedQuery query = em.createNamedQuery(hql, this.classe);
        for (int i = 0; i < params.size(); i++) {
            // System.out.println(params.get(i) + " - " + value.get(i));
            query.setParameter(params.get(i), value.get(i));
        }
        // System.out.println();
        // System.out.println();        
        return maxResults == 0 ? query.getResultList() : query.setMaxResults(maxResults).getResultList();
        // return null;
    }

    @Override
    public int updateHQLQuery(String queryId) {
        String hql = hqlQuery.findValue(queryId);
        // System.out.println(hql);
        Query query = em.createQuery(hql);
        int updateCount = query.executeUpdate();
        em.flush();
        return updateCount;
    }

    @Override
    public int updateHQLQuery(String queryId, List value) {
        String hql = hqlQuery.findValue(queryId);
        Pattern pattern = Pattern.compile("(:\w+)");
        Matcher matcher = pattern.matcher(hql);
        List params = new ArrayList<>();
        while (matcher.find()) {
            params.add(matcher.group().replace(":", ""));
        }
        // System.out.print(hql);
        Query query = em.createQuery(hql);
        for (int i = 0; i < params.size(); i++) {
            query.setParameter(params.get(i), value.get(i));
        }
        int updateCount = query.executeUpdate();
        em.flush();
        return updateCount;
    }

    @Override
    public void remove(T entity) {
        em.remove(em.contains(entity) ? entity : em.merge(entity));
        em.flush();
    }

Startup Business Food Delivery for Sale! Low overhead costs and excellent home-based business.

Business Delivery Startup Business for sale.

Dish Out
www.dishout.club

[​IMG]

Be on the new wave in the
Restaurant Food Delivery Service Industry!

Company Overview:
Deliver meals from local restaurants and receive delivery charges plus the percentage of the cost of the meal. Low overhead costs and a great home-based business. It's a great opportunity to run a business from your home. Especially this case!

DishOut revolutionizes the way people eat, offering the convenience of having your favorite restaurants delivered directly to your home, office or private event.

People are becoming more and more concerned about their health. We now know that when we eat healthier, we feel better, look better, live longer and are overall happier. DishOut allows people to order any type of food compared to traditional pizzas and Chinese with limited health options.
SEMrush

Technology exploded so quickly. At DishOut, we recognized a unique moment in which technology in the foodservice industry finally caught up with the speed, convenience and affordability that people now expect in their daily lives.

In addition to the opportunity to own a one-of-a-kind, exciting and proven business, here are some major benefits to being the new owner of DishOut.


Why invest in this business?

This business is located in Ohio and Michigan and can be relocated with the addition of new restaurants.

In the United States, the food and beverage sector represents $ 709.24 billion. Nearly 26 percent of Americans order food or take-out once a week, according to Statistica.com.

Food delivery in restaurants is an online logistics system on demand logistics that takes food orders in restaurant deliveries and runs.

This company has low overhead costs and incredible growth potential. This is a starter restaurant delivery service with mobile apps.

More reasons to buy this business!

  1. Very little start up cost
  2. No brick and mortar requirements.
  3. The best and fastest home delivery service in the country.
  4. Not limited to a place or geographical area.
  5. Unlimited income potential.

What is included with this company?

  1. Field
  2. Whole business assets
  3. Whole company
  4. Complete training program
  5. Help build your market with one of our skilled professionals
  6. Advanced software for tracking orders, delivery times, drivers and customers. This software does the work for you by maintaining a low and manageable overhead allowing you to stay in touch with your customers with automated e-mail campaigns, "Refer a Friend" marketing programs and well-known e-mail campaigns. other exclusive features such as mobile apps and mobile websites.
  7. Internal optimization of SEO and marketing planning
  8. Experienced management team with more than 10 years of experience in the sector. Knowledge and experience
  9. Complete marketing program to ensure the success of this business


Financiers
Asking price:
<Negotiable
Gross income: Start
Cash flow: $ 12,000
Type of cash flow: Discretionary cash sale
Inventory: $ 5000
Seller financing: No

About the company
Year of creation:
2019
Number of employees: 1 – 3
relocatable: Yes
Franchise: No
Current real estate: Possesses

Management Training and Support:
Support and training

Keywords:
Starting the delivery of food for sale,
Starting the food delivery,
Starting mobile applications for sale,
Purchase of a mobile application,
Startup Food Delivery,
Buy a mobile app,
Starting the delivery of food for sale,
Starting mobile applications for sale,
Business for sale,

Serious inquiries only!

(PM surveys)

Where can I go to avoid overhead of aircraft?

Where on Earth can I go without seeing or hearing planes flying overhead?