Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
26 views

Prefetching complex query that does a Union

I'm trying to prefetch a related object to optimize performance. The code I'm trying to Prefetch is this; class Product(models.Model): ... def get_attribute_values(self): # ToDo: ...
Joey's user avatar
  • 3
4 votes
0 answers
62 views

How to write a performance-portable daxpy?

Problem A daxpy is the computation y = y + alpha * x for vectors x, y and scalar alpha. This is limited by RAM-CPU bandwidth if x, y do not fit in cache. On my system, I consistently get only 23 GB/s, ...
user25664889's user avatar
0 votes
0 answers
22 views

How to Render Content in SSR with a Delayed API Response While Keeping It in the Source Code?

I'm working on a Quasar project where I use preFetch and SSR to render content on my PLP (Product Listing Page). However, one of my APIs (getTours) takes around 30 seconds to respond, causing the page ...
Salar Hosseini's user avatar
1 vote
3 answers
67 views

Next.js 14 Link Tag Doesn't Prefetch Data - Network Tab Shows Empty {}

I'm currently working with Next.js 14 and encountered an issue where the Link tag does not seem to prefetch data. Specifically, in the network tab of the developer tools, the preview shows {} instead ...
Waquar Mahboob's user avatar
2 votes
0 answers
129 views

optimize indexing while inside of a loop

i want to try optimizing this line of code: for i in 0..len { slots[values[i].slot].count += 1; } (both of these lists are extremely long and the same size) i have already optimized it like this(...
Per's user avatar
  • 31
0 votes
0 answers
30 views

Why does Prefetch perform better than annotation in django?

Hello I made a code to make it irregular. tell me why prefetch is faster if I simply import the value, but if I save it, it's faster? *just import annotate test: execution time: 1.29 seconds prefetch ...
dudu's user avatar
  • 39
1 vote
0 answers
34 views

the Perf event issues of hardware prefetcher (all_pf_data_rd and pf_l2_data_rd)

My platform is 2nd generation scalable Xeon, equipped with a non-inclusive cache. I run a series of tests that had the L2 stream prefetcher aggressively prefetching. I use Perf to monitor performance, ...
grayxu's user avatar
  • 134
0 votes
1 answer
39 views

How to prefetch external JSON and use it?

I want to prefetch (or maybe preload) a JSON file from an URL and use it later on my JS file. How can I send the prefetched JSON to the JS file? Something like on the HTML head: <link rel="...
saposabio's user avatar
0 votes
0 answers
16 views

selector_matches not working in speculationrules for prerendering

I'm using Chrome v124. My html: <div><a class="sidebar" href="https://example.com/somewhere/">Test selector_match exclusion</a></div> My speculationrules: &...
kodfire's user avatar
  • 1,773
3 votes
0 answers
207 views

How does the next PAGE hardware prefetcher work?

L2/L3 hardware prefetcher behaviors are well documented (their aggressiveness, their tiggers, etc). However, very little is known about the next-page prefetcher that supposedly pre-loads the TLB when ...
idle_cycles's user avatar
0 votes
0 answers
52 views

Optimizing Memory-Bound Loop with Indirect Prefetching

I'm currently working on optimizing a kernel, and one of the most time-consuming loops, despite optimization efforts, still accounts for 80% of the benchmark's execution time. The loop's performance ...
Hod Badihi's user avatar
1 vote
1 answer
32 views

how to prefetch comments in django [duplicate]

class Comment(models.Model): parent_comment=models.ForeignKey( to='self', related_name='_comments', on_delete=models.DO_NOTHING, null=True, blank=True, how to prefetch _comments: ...
dudu's user avatar
  • 39
0 votes
0 answers
14 views

How to optimize and implement infinite comments through prefetch with django orm?

I'm implementing the comment function and I can leave a big message in the comments. It was easy to implement the function, but it's causing n+1 queries. Please tell me how to solve this problem ...
dudu's user avatar
  • 39
1 vote
0 answers
53 views

why is there a need to stop prefetching to pages when a write happens to it?

I read in this StackOverflow answer that prefetching does not happen for dirty pages. In which condition DCU prefetcher start prefetching? It seems to me that the prefetcher is receiving the dirty ...
Sai Aravind's user avatar
0 votes
0 answers
351 views

NextJs app router prefetch in dyanmic generated page

I have an issue in NextJs app router. The setup is like this: app -store -page.js [regionName] [placeName] [storeName] In store page I have a list of links that routes to the ...
freebiker's user avatar
0 votes
0 answers
43 views

Change html page seamlessly on buttonPress

I am trying to find a way to change my html page on button press seamlessly (imagine pageA.html ends with a fullscreen image -> pageB.html starts with the same fullscreen image). I have tried manually ...
Lkjam's user avatar
  • 1
0 votes
1 answer
202 views

Django's Very slow initial execution of select query on remote Oracle 11 database when table contain big blobs

I actually understand what is causing the problem but can't figure out a solution that works with Django. suppose you are trying to read 10,000 records from oracle database over network, normally ...
Ramast's user avatar
  • 7,549
0 votes
0 answers
63 views

Effect of non-temporal loads on future temporal loads on ARM processor

I was having the following issue, on an ARMv8 Cortex-A53 processor. I have two functions, one that writes to an array with no cache re-use (streaming_work), which I can feed to another function with ...
Mihir Shah's user avatar
0 votes
0 answers
212 views

How can I determine if my Intel CPU supports disabling prefetching through model specific registers?

I will be helping with a hardware security class in the spring, and I am currently setting up some of the labs for the class. One of the labs we are doing is a cache side-channels lab where we look at ...
Nick's user avatar
  • 1
-1 votes
1 answer
85 views

Reading prefetch file content

I'm using python prefetch view to read the prefetch files' content. But the tool show something like volume guid or anything instead of volume letter Is there any correct way to convert "\VOLUME{...
Karree's user avatar
  • 7
0 votes
0 answers
36 views

Next JS prefetch return data

Is there a way to return the json file that the prefetch method calls? for example If I call router.prefetch('/myPage') NextJs makes a network request to myPage.json The data I need is in that myPage....
Branny's user avatar
  • 178
3 votes
1 answer
203 views

Which execution unit in the CPU executes the prefetch instruction?

According to Intel's manual, prefetch instructions generally do not trigger faults or exceptions, which is different from regular load instructions. PREFETCH provides a hint to the hardware; it does ...
Frontier_Setter's user avatar
-2 votes
1 answer
141 views

How can I further optimize this code regarding array operations?

In the following code I am performing an XOR operation on two arrays result and DB, the result is accessed after an offset called rotate1 in the following. As you can see, I am already doing AVX2, ...
CryptoKitty's user avatar
0 votes
0 answers
20 views

WinPrefetchView GUI

I am wondering within the windprefetchview, when looking at the information in the GUI for the .pf file, what is the index column really used for? Learning in class, wondering if there is an easy ...
McDubs's user avatar
  • 1
1 vote
1 answer
92 views

GCC, GDC, and LLVM and LDC compilers’ prefetch builtins - exact meaning of the locality parameter

In the description of the x86 prefetch instructions, I found the following explanation for the instructions’ hint number "Fetches the line of data from memory that contains the byte specified ...
Cecil Ward's user avatar
1 vote
1 answer
122 views

Not getting any cache-pollution benefit from PREFETCHNTA on Zen 3

I'm trying to write a non-cache-polluting memcpy (using PREFETCHNTA for reads and streaming writes) and first doing some artificial benchmarking to determine what prefetch distances work well. I've ...
Bruce Merry's user avatar
0 votes
0 answers
94 views

Is there a way I can improve performance by using special prefetch instructions and if so where/how to deploy them?

I have written a recursive descent parser, so one that is not table-driven, and it typically only takes a very small amount of input text which might only be 30-100 code units (optionally either 16-...
Cecil Ward's user avatar
1 vote
0 answers
47 views

How to calculate F1 score for tensor flow dataset which is batched and prefetched (multi label image classification)

This is the code snippet for the datasets train_ds= tf.keras.preprocessing.image_dataset_from_directory( "./tmp/Alzheimer_s_Dataset/train/", validation_split=0.2, subset="training",...
jaggu ramesh's user avatar
0 votes
1 answer
489 views

Having trouble prefetching data in Next.js

I have a simple dummy API that returns an array of objects dummy data such as: // api/projectsdata.js export default function handler(req, res) { res.status(200).json([{...},{...},{...}] ...
Roma Kim's user avatar
  • 361
0 votes
1 answer
177 views

ActiveMQ prefetchPolicy of 1 causes messages to timeout, while 0 appears to work. Misunderstanding of concept?

We have queues where some message may take milliseconds to process and some minutes (i.e. both fast and slow messages). A problem we have been seeing is that messages get dropped due to timeout (no ...
Matthias's user avatar
  • 146
0 votes
1 answer
422 views

What are the implications of designing prefetchers at different cache levels?

I see a lot of papers about prefetching, some of them claim to be used at L1 level, and some claim to be used at LLC level. Why is there such a restriction? I know that the L1 data cache is much ...
Gerrie's user avatar
  • 776
1 vote
1 answer
488 views

How instructions are fetched into modern CPUs(2023)?

I am learning rocketchip these days, and I have noticed the IFU(Instruction Fetch Unit) fetches instructions from ibuf instead of main memory. But I have not seen any codes about how instructions are ...
Teng Wu's user avatar
  • 93
0 votes
1 answer
26 views

Django REST framework prefetch not working on model with multiple foreign keys to the same target

I'm writing an endpoint to fetch data from the "Term" model in Django REST framework and I'm trying to reduce queries by prefetching data. Specifically there is a model "TermRelation&...
Hanimir's user avatar
  • 13
1 vote
2 answers
2k views

Has anyone ever done this before? Caching Images and showing them offline the first time they appear?

I created an app with react native (expo) that shows a lot of product images. My customer wants the app to work 100% offline. This means that the images should all be prefetched when the app is ...
David's user avatar
  • 21
2 votes
0 answers
57 views

_mm_prefetch and heap buffer overflow

I saw a piece of code that looked like this sample program: #include <immintrin.h> int main() { int arr[1024]; for (int i = 0; i < 1024; i++) { arr[i] = i; } // Declare a ...
jeffreyveon's user avatar
  • 13.8k
1 vote
0 answers
525 views

Module federation prefetch during browser idle time

Requirement: To prefetch the remote modules(module federated) during browser idle time in react. I've tried webpack magic comment webpackPrefetch: true but that did not work with module federation. I ...
macro's user avatar
  • 41
1 vote
1 answer
174 views

Using tf.data.Dataset prefetch makes model performance overfit?

I'm trying to train a simple LRCN model with some sequential image dataset in Tensorflow 2.5.0. Training performance was fine like increasing to 0.9x training & validation accuracy both in first 5 ...
Young.J's user avatar
  • 503
1 vote
0 answers
272 views

prefetch data with header and body next.js

I have question about prefetching data. As i know, normally we can not prefetch data with header and body in getstaticprops nextjs 12 or new fetch way in nextjs 13 because it rendered on the server ...
alireza's user avatar
  • 93
0 votes
1 answer
93 views

Does the last level cache see the PC?

I was recently reading some papers on caching data prefetching. I found that the cache prefetch technology implemented in LLC needs to record the PC of the memory access instruction. But does the LLC ...
Gerrie's user avatar
  • 776
3 votes
0 answers
721 views

NextJs rewrites does not proxy API calls in getServerSideProps

I am using react-query prefetchQuery and NextJS (v.13) getServerSideProps along with its rewrites option in next.config.js file to proxy API calls. The rewrites looks like this: async rewrites() { ...
Ali Baghban's user avatar
0 votes
1 answer
67 views

In Django, how to filter a _set inside a for loop?

I have these two models: class Convocacao(models.Model): cursos = models.ForeignKey(Cursos) class RegistroConvocacao(models.Model): convocacao = models.ForeignKey(Convocacao) I get a specific ...
Neto's user avatar
  • 11
1 vote
1 answer
298 views

Is __builtin_prefetch safe to be call with nullptr

Suppose we have linked list and code like this: void play_with_list(struct int_list *list) { while (list != NULL) { __builtin_prefetch(list->next); do_something(list->n); list = list->...
Nick's user avatar
  • 10.4k
1 vote
0 answers
154 views

How to interpret the effect of stride size on Intel's hardware prefetching?

In Section 9.5.3 of Intel® 64 and IA-32 Architectures Optimization Reference Manual, the effects of hardware prefetching are described as follows: The effective latency reduction for several ...
Frontier_Setter's user avatar
1 vote
0 answers
659 views

Vue.js 2 / Webpack Part disable Prefetch - Cannot call .tap() on a plugin that has not yet been defined. Call plugin('prefetch').use(<Plugin>) first

I have a piece of config in my vue.config.js file which is intended to prevent Vue from prefetching files that are dynamically loaded. The code looks like this... chainWebpack: config => { ...
Keith Jackson's user avatar
2 votes
1 answer
389 views

`speculationrules` markup not working for prerendering pages in Chrome

Following the instructions in the Chrome blog Prerender pages in Chrome for instant page navigations, I am trying to enable pre-rendering on a website. I have added this snippet just before </body&...
James's user avatar
  • 7,463
1 vote
0 answers
211 views

prevent Next Js from Caching and preFretching specific page

I am working on e-commerce website and I am using Next Js and everything was working ok till I Started to work on Cart Page cause its always changing - I am using ssr with it cause I need to do some ...
M7mod Bakr's user avatar
2 votes
2 answers
3k views

How to identify Nextjs prefetch request in the middleware

I'm trying to identify the prefetch requests made by next.js in the middleware so that the my custom logic only runs when users navigates between pages. So I tried to look for the different request ...
Hrithik Agrawal's user avatar
0 votes
0 answers
308 views

How does CPUID serialize execution instructions?

I'm learning software prefetch instructions. I want to add fence instructions to serialize prefetch instructions. But the meaning in the manual seems to be that prefetch is not affected by fence. But ...
Gerrie's user avatar
  • 776
0 votes
0 answers
33 views

Looking for a set of benchmark applications which do not work well with modern CPU prefetchers, caches, branch predictors, etc

Does anyone know where I can find a set of applications which are not amenable to modern micro-architecture sub-circuits which are present in CPUs, i.e. which do not benefit from modern micro-...
Setu's user avatar
  • 690
1 vote
1 answer
440 views

how to use useState like this? what does it mean?

Can anyone please explain me what const rerender = React.useState(0)[1] is this? import React from 'react' import axios from 'axios' import { useQuery, useQueryClient, QueryClient, ...
Vijay Sai's user avatar

1
2 3 4 5
11